Skip to content

Commit 758ddb9

Browse files
committed
added fixtures for db tests
1 parent b55bbc1 commit 758ddb9

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

django/conftest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import pytest
2+
3+
from django.core.management import call_command
4+
5+
@pytest.fixture(scope='session')
6+
def django_db_setup(django_db_setup, django_db_blocker):
7+
with django_db_blocker.unblock():
8+
call_command('loaddata', 'fixtures-tests/sites.site.json')
9+
call_command('loaddata', 'fixtures-tests/gsuser.user.json')
10+
call_command('loaddata', 'fixtures-tests/gsmap.municipality.json')
11+
call_command('loaddata', 'fixtures-tests/gsmap.snapshot.json')

django/fixtures-tests/gsmap.municipality.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

django/fixtures-tests/gsmap.snapshot.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"model": "gsuser.user", "pk": 1, "fields": {"password": "pbkdf2_sha256$180000$0wINEkSnlTLQ$cKkWUQGHdT4/pT9KcNzOZ+XS0LNw8Wx4VF4tuZ1oXkE=", "last_login": "2020-05-10T16:16:58.410Z", "is_superuser": true, "username": "admin", "first_name": "", "last_name": "", "email": "[email protected]", "is_staff": true, "is_active": true, "date_joined": "2020-05-10T16:11:16.244Z", "groups": [], "user_permissions": []}}]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"model": "sites.site", "pk": 1, "fields": {"domain": "localhost:8081", "name": "localhost:8081"}}]

0 commit comments

Comments
 (0)