Create user for tests if necessary

This commit is contained in:
shortcutme 2019-04-15 22:19:16 +02:00
parent 034e104c06
commit b168772d7f
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 2 additions and 0 deletions

View File

@ -218,6 +218,8 @@ def site_temp(request):
@pytest.fixture(scope="session")
def user():
user = UserManager.user_manager.get()
if not user:
user = UserManager.user_manager.create()
user.sites = {} # Reset user data
return user