mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
remove pytest.mark.usefixtures decorator
while it's nice to use the decorator to signify fixtures with side effects, it has unfortunate problems of completely overriding any fixtures you've declared in the funcargs - so isn't really suitable for our usecase where we often have other fixtures we rely on to return values to us. So for consistency, let's remove this and stick to using funcargs to define our fixtures
This commit is contained in:
@@ -10,8 +10,8 @@ def create_user(mobile_number="+447700900986", email="notify@digital.cabinet-off
|
||||
'mobile_number': mobile_number,
|
||||
'state': 'active'
|
||||
}
|
||||
usr = User.query.filter_by(email_address=email).first()
|
||||
if not usr:
|
||||
usr = User(**data)
|
||||
save_model_user(usr)
|
||||
return usr
|
||||
user = User.query.filter_by(email_address=email).first()
|
||||
if not user:
|
||||
user = User(**data)
|
||||
save_model_user(user)
|
||||
return user
|
||||
|
||||
Reference in New Issue
Block a user