def test_add_fan_to_data(self): signed_user_controller = SignedUserController() d1 = datetime.datetime(2020, 4, 23) signed_user_controller.add_fan_to_data("name_u1", "1234", "ro", d1, "0.0.0.5") self.assertTrue(signed_user_controller.get_user("name_u1")) self.assertTrue( type(signed_user_controller.get_user("name_u1")) is Fan)
def test_number_of_admins(self): signed_user_controller = SignedUserController() d1 = datetime.datetime(2020, 4, 23) d2 = datetime.datetime(2020, 4, 23) self.assertEqual(0, signed_user_controller.number_of_admins()) signed_user_controller.add_system_admin("name_u1", "1234", "ro", d1, "0.0.0.5") signed_user_controller.add_system_admin("name_u21", "1234", "rso", d2, "0.0.0.2") signed_user_controller.add_fan_to_data("name_u2221", "12334", "rowe", d2, "0.0.0.1") self.assertEqual(2, signed_user_controller.number_of_admins())