Removed user tests

This commit is contained in:
Ruben Sanchez 2023-12-12 09:48:12 -05:00
parent 2188b62490
commit 5f5dd2c60a

View File

@ -174,31 +174,6 @@ class TestDBFactory(TestCase):
""" """
TestDBFactory TestDBFactory
""" """
@unittest.skipIf(control.skip_test, control.skip_reason)
def test_create_user(self):
new_user_name = 'user_creation_test'
new_user_id = control.database.create_user(new_user_name, control.application_id, 'test', UserRoles.Admin)
try:
saved_user = control.database.get_by_name_and_application(new_user_name, control.application_id)
self.assertEqual(new_user_id, saved_user.id, "Could not find matching user id")
except Exception as err:
control.database.delete_user(new_user_id)
self.assertTrue(False, f'Unexpected {err=}, {type(err)=}')
control.database.delete_user(new_user_id)
@unittest.skipIf(control.skip_test, control.skip_reason)
def test_delete_user(self):
new_user_name = 'user_deletion_test'
new_user_id = control.database.create_user(new_user_name, control.application_id, 'test', UserRoles.Admin)
control.database.delete_user(new_user_id)
try:
deleted_user = control.database.get_by_name_and_application(new_user_name, control.application_id)
self.assertIsNone(deleted_user, "User was not deleted successfully")
except TypeError:
pass
@unittest.skipIf(control.skip_test, control.skip_reason) @unittest.skipIf(control.skip_test, control.skip_reason)
def test_create_city(self): def test_create_city(self):