python 3 updates

- Fix super() calls for python 3
- No need to inherit objects.
- No need for u at the start of strings
- Tidied up some brackets and f-strings too
This commit is contained in:
Mark Mayo
2022-11-19 17:43:41 +13:00
committed by GitHub
parent 02362d8aa4
commit 41508f7f67
354 changed files with 532 additions and 534 deletions

View File

@@ -41,7 +41,7 @@ class TestMFATests(BaseTestGenerator):
if start is not None:
start(self)
super(BaseTestGenerator, self).setUp()
super().setUp()
def tearDown(self):
@@ -50,7 +50,7 @@ class TestMFATests(BaseTestGenerator):
finish(self)
config.MFA_SUPPORTED_METHODS = []
super(BaseTestGenerator, self).tearDown()
super().tearDown()
def runTest(self):
self.check(self)

View File

@@ -50,8 +50,8 @@ def check_validation_view_content(test):
response = test.tester.get("/mfa/validate")
test.assertEquals(response.status_code, 200)
test.assertEquals(
test.assertEqual(response.status_code, 200)
test.assertEqual(
response.headers["Content-Type"], "text/html; charset=utf-8"
)
# test.assertTrue('Dummy' in response.data.decode('utf8'))