def user(self, db_session): user = models.User(authority="example.com", username="******", email="*****@*****.**") user.activation = models.Activation() db_session.add(user) db_session.flush() return user
def test_User_activate_activates_user(self, db_session): user = models.User(authority="example.com", username="******", email="*****@*****.**") activation = models.Activation() user.activation = activation db_session.add(user) db_session.flush() user.activate() db_session.commit() assert user.is_activated
def test_User_activate_activates_user(self, db_session): # noqa: N802 user = models.User(authority='example.com', username='******', email='*****@*****.**') activation = models.Activation() user.activation = activation db_session.add(user) db_session.flush() user.activate() db_session.commit() assert user.is_activated