Added missing fixture, changed first superuser logic check

pull/29/head
Piero Toffanin 2016-10-07 23:02:48 -04:00
rodzic 4923a507c9
commit 1a3bb07b1e
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -7,7 +7,7 @@ from django.contrib.auth.models import User
class TestApi(TestCase):
fixtures = ['test_users', ]
fixtures = ['test_users', 'test_projects', ]
def setUp(self):
Project(

Wyświetl plik

@ -21,7 +21,7 @@ def boot():
)
# Check super user
if User.objects.count() == 0:
if User.objects.filter(is_superuser=True).count() == 0:
User.objects.create_superuser('admin', 'admin@example.com', 'admin')
logger.info("Created superuser")
except ProgrammingError: