Fixed test for python3.11

This commit is contained in:
CasVT
2023-07-02 20:06:22 +02:00
parent 1e3691ff3e
commit c704745220
2 changed files with 1 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ import backend.custom_exceptions
class Test_Custom_Exceptions(unittest.TestCase):
def test_type(self):
defined_exceptions: List[Exception] = map(lambda c: c[1], getmembers(modules['backend.custom_exceptions'], isclass))
defined_exceptions: List[Exception] = filter(lambda c: c.__module__ == 'backend.custom_exceptions', map(lambda c: c[1], getmembers(modules['backend.custom_exceptions'], isclass)))
for defined_exception in defined_exceptions:
self.assertEqual(getmro(defined_exception)[1], Exception)
result = defined_exception().api_response

View File

@@ -8,5 +8,3 @@ class Test_DB(unittest.TestCase):
DBConnection.file = _folder_path(*DB_FILENAME)
instance = DBConnection(timeout=20.0)
self.assertEqual(instance.cursor().execute("PRAGMA foreign_keys;").fetchone()[0], 1)