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

13 lines
341 B
Python

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