e2e: cleanup, always take screenshots on teardown

This commit is contained in:
Jens Langhammer
2020-06-21 15:09:01 +02:00
parent 0838f518d4
commit 1b3c0adf75
3 changed files with 10 additions and 13 deletions

View File

@ -1,9 +1,9 @@
"""passbook e2e testing utilities"""
from functools import lru_cache
from os import makedirs
from glob import glob
from importlib.util import module_from_spec, spec_from_file_location
from inspect import getmembers, isfunction
from os import makedirs
from Cryptodome.PublicKey import RSA
from django.apps import apps
@ -55,8 +55,7 @@ class SeleniumTestCase(StaticLiveServerTestCase):
)
def tearDown(self):
if self.failureException:
self.driver.save_screenshot("out/{self.__class__.__name__}.png")
self.driver.save_screenshot(f"out/{self.__class__.__name__}.png")
self.driver.quit()
super().tearDown()