Cleanup testing

This commit is contained in:
2020-05-27 15:48:56 -04:00
parent f69365a0fb
commit 26f48c7ef4
3 changed files with 4 additions and 5 deletions

View File

@@ -58,7 +58,7 @@ def screenshot_failure(func):
func(self, *args, **kwargs) func(self, *args, **kwargs)
except Exception as e: except Exception as e:
screenshot_name = func.__module__ + "." + func.__qualname__ screenshot_name = func.__module__ + "." + func.__qualname__
screenshot_file = "screenshots/"+func.__qualname__+".png" screenshot_file = "screenshots/" + func.__qualname__ + ".png"
if not pathlib.Path("screenshots").is_dir(): if not pathlib.Path("screenshots").is_dir():
os.mkdir("screenshots") os.mkdir("screenshots")
self.driver.save_screenshot(screenshot_file) self.driver.save_screenshot(screenshot_file)

View File

@@ -19,6 +19,8 @@ def parse_bool_from_string(string):
return False return False
# 12-Hour vs 24-Hour Time. Affects widget display # 12-Hour vs 24-Hour Time. Affects widget display
def get_time_format(): def get_time_format():
# Default # Default
time_format = "%H:%M" time_format = "%H:%M"

View File

@@ -23,8 +23,6 @@ from django.test.client import Client
from django.core import mail, signing from django.core import mail, signing
from django.http import HttpResponseBadRequest from django.http import HttpResponseBadRequest
from django.conf import settings from django.conf import settings
import sys
@screenshot_failure_cls @screenshot_failure_cls
class BaseRigboardTest(AutoLoginTest): class BaseRigboardTest(AutoLoginTest):
@@ -233,7 +231,6 @@ class TestEventCreate(BaseRigboardTest):
self.page.person_selector.set_option(self.client.name, True) self.page.person_selector.set_option(self.client.name, True)
self.page.person_selector.toggle() self.page.person_selector.toggle()
self.assertFalse(self.page.person_selector.is_open) self.assertFalse(self.page.person_selector.is_open)
print("Language: " + self.driver.execute_script("return window.navigator.userLanguage || window.navigator.language;"), file=sys.stderr)
self.page.name = "Access Validation Test" self.page.name = "Access Validation Test"