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