lostplaces-backend/lostplaces/lostplaces_app/tests/__init__.py

13 lines
348 B
Python
Raw Normal View History

2020-09-03 20:11:02 +02:00
from django.db import models as django_models
2020-09-03 20:06:06 +02:00
from lostplaces_app.models import Explorer
2020-09-03 20:11:02 +02:00
2020-09-03 20:06:06 +02:00
def mock_user():
explorer_list = Explorer.objects.all()
if len(explorer_list) <= 0:
return Explorer.objects.create_user(
username='testpeter',
password='Develop123'
)
else:
2020-09-03 22:22:04 +02:00
return explorer_list[0]