def test_persist_user(self): """Test persist_user Insert a user and test if get_number_of_user return 1 """ self.tps.clean_up() security = Security(self.settings, self.request.session, 'jdoe', '*****@*****.**', 'iamjohndoe', 'iamjohndoe') assert security.get_number_of_users() == 0 security.persist_user('http://localhost') assert security.get_number_of_users() == 1 #assert security. security = Security(self.settings, self.request.session, 'jdoe2', '*****@*****.**', 'iamjohndoe', 'iamjohndoe') security.persist_user('http://localhost') assert security.get_number_of_users() == 2
def test_get_number_of_users(self): """Test get_number_of_users test the method with 0, 1 and 2 users """ self.tps.clean_up() security = Security(self.settings, self.request.session, '', '', '', '') assert security.get_number_of_users() == 0 self.tps.add_jdoe_in_users() assert security.get_number_of_users() == 1 self.tps.add_jsmith_in_users() assert security.get_number_of_users() == 2
def test_get_number_of_users(self): """Test get_number_of_users test the method with 0, 1 and 2 users """ self.tps.clean_up() security = Security(self.settings, self.request.session, '', '', '', '') assert security.get_number_of_users() == 0 self.tps.add_jdoe_in_users() assert security.get_number_of_users() == 1 self.tps.add_jsmith_in_users() assert security.get_number_of_users() == 2
def test_persist_user(self): """Test persist_user Insert a user and test if get_number_of_user return 1 """ self.tps.clean_up() security = Security(self.settings, self.request.session, 'jdoe', '*****@*****.**', 'iamjohndoe', 'iamjohndoe') assert security.get_number_of_users() == 0 security.persist_user('http://localhost') assert security.get_number_of_users() == 1 #assert security. security = Security(self.settings, self.request.session, 'jdoe2', '*****@*****.**', 'iamjohndoe', 'iamjohndoe') security.persist_user('http://localhost') assert security.get_number_of_users() == 2