mirror of
https://github.com/Casvt/MIND.git
synced 2026-04-03 03:00:22 -04:00
Fixed test for python3.11
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user