def test_get_user_who_exists(self): user = dao.get_user(self.expected_username) self.assertIsNotNone(user) self.assertEqual(user.username, self.expected_username, "The username of the user is not correct.") self.assertEqual(user.hash, self.expected_hash, "The hash of the user is not correct.")
def test_get_user_who_does_not_exist(self): user = dao.get_user("someperson") self.assertIsNone(user)