def test_exists_by_username_returns_true_when_user_exists(self): repo = UserRepo(TEST_SESSION_FACTORY) repo.add_user(User(username="******", email="good@somewhere")) self.assertTrue(repo.exists_by_username("goodusername"))
def test_exists_by_username_returns_false_when_no_user_exists(self): repo = UserRepo(TEST_SESSION_FACTORY) self.assertFalse(repo.exists_by_username("badusername"))