def user(user_table): """ create user """ with patch(PATCH_METHOD) as req: req.return_value = {} user_instance = User() user_instance.set_user_id("user_foo_id") user_instance.set_user_email("*****@*****.**") user_instance.set_user_name("foo_username") user_instance.save() yield user_instance
def mock_get_user_by_github_username(username): u1 = User() u1.set_user_email('*****@*****.**') return [u1]