lostplaces-backend/lostplaces/lostplaces_app/tests/__init__.py
2020-09-03 22:22:04 +02:00

13 lines
348 B
Python

from django.db import models as django_models
from lostplaces_app.models import Explorer
def mock_user():
explorer_list = Explorer.objects.all()
if len(explorer_list) <= 0:
return Explorer.objects.create_user(
username='testpeter',
password='Develop123'
)
else:
return explorer_list[0]