Skip to content

Commit

Permalink
move development fixtures to individual apps
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgraham4401 committed Aug 22, 2024
1 parent 0c4b27b commit 9f34311
Show file tree
Hide file tree
Showing 8 changed files with 208 additions and 212 deletions.
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
sh -c "
python manage.py makemigrations &&
python manage.py migrate &&
python manage.py loaddata dev_data.yaml org_permissions.yaml &&
python manage.py loaddata core_dev.yaml rcrasite_dev.yaml org_dev.yaml profile_dev.yaml &&
python manage.py runserver 0.0.0.0:8000"
healthcheck:
test:
Expand Down
2 changes: 1 addition & 1 deletion server/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
**/tests
Dockerfile
.dockerignore
db.sqlite3
**/*.sqlite3
**/.git
**/.gitignore
**/.vscode
Expand Down
45 changes: 45 additions & 0 deletions server/core/fixtures/core_dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
- model: core.trakuser
pk: 8062d496-15f1-485d-961c-a8e5fa118dde
fields:
password: pbkdf2_sha256$390000$iVFyQyb6N3g06Wan8YLnTv$MgFhKBvwPSwctgxWSviA/OXClEKtDXg87iPU+g9+Zjs=
last_login: 2023-03-19 00:29:46.249589+00:00
is_superuser: false
username: orgadmin
first_name: "org"
last_name: "admin"
email: [email protected]
is_staff: true
is_active: true
date_joined: 2022-12-17 19:14:17.239000+00:00
groups: [1, 2]
user_permissions: []
- model: core.trakuser
pk: a0ba4966-aa53-44c8-be1a-0a0d2d6b6acd
fields:
password: pbkdf2_sha256$390000$iVFyQyb6N3g06Wan8YLnTv$MgFhKBvwPSwctgxWSviA/OXClEKtDXg87iPU+g9+Zjs=
last_login: 2023-03-19 00:29:46.249589+00:00
is_superuser: true
username: admin
first_name: ""
last_name: ""
email: [email protected]
is_staff: true
is_active: true
date_joined: 2022-12-17 19:14:17.239000+00:00
groups: []
user_permissions: []
- model: core.trakuser
pk: 4ac96f68-42cf-47ea-bffb-f24d423dbc35
fields:
password: pbkdf2_sha256$390000$SB7EHpYC88CjsX5tcbxa8E$yh1TWONkGI2z/bjblkPSTyjpd1UdhnivPW5nzA9NGOk=
last_login: null
is_superuser: false
username: testuser1
first_name: "David"
last_name: "Graham"
email: "[email protected]"
is_staff: false
is_active: true
date_joined: 2022-12-17 19:17:58.260000+00:00
groups: [2]
user_permissions: []
210 changes: 0 additions & 210 deletions server/fixtures/dev_data.yaml

This file was deleted.

1 change: 1 addition & 0 deletions server/manifest/tests/services/test_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@


class TestGetManifestService:
# ToDo: fix transaction related to this test
def test_returns_manifests_from_all_user_sites_by_default(
self,
manifest_factory,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
- model: org.org
pk: efb9e104-7f61-4365-a9af-9d7b55c854c4
fields:
name: Generators Org LLC
admin: 8062d496-15f1-485d-961c-a8e5fa118dde
slug: generators-org-llc
- model: org.site
pk: 1
fields:
name: VA TEST GEN 2021
rcra_site: 1
last_rcrainfo_manifest_sync: null
org: efb9e104-7f61-4365-a9af-9d7b55c854c4
- model: org.siteuserobjectpermission
pk: 1
fields:
permission:
- view_site
- org
- site
user:
- testuser1
content_object: 1
- model: auth.group
fields:
name: Org admin
Expand Down
44 changes: 44 additions & 0 deletions server/profile/fixtures/profile_dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
- model: profile.rcrainfoprofile
pk: d74f904a-7843-4a60-862c-3b94b6051359
fields:
rcra_username: dpgraham4401
phone_number: null
email: [email protected]
- model: profile.rcrainfoprofile
pk: 1fd27bec-8743-4eb3-a44c-fd063ea62021
fields:
rcra_username: ""
phone_number: null
email: [email protected]
- model: profile.rcrainfoprofile
pk: 192c73f4-24f1-4f21-8239-dee2da43c547
fields:
rcra_username: emanifestpyuser1
phone_number: null
email: [email protected]
- model: profile.profile
pk: c65dbee9-b6bf-400e-93e0-90a749cc2939
fields:
user: 8062d496-15f1-485d-961c-a8e5fa118dde
rcrainfo_profile: d74f904a-7843-4a60-862c-3b94b6051359
- model: profile.profile
pk: 186642a9-7b5f-4bcb-b328-0fdf8b43f191
fields:
user: a0ba4966-aa53-44c8-be1a-0a0d2d6b6acd
rcrainfo_profile: 1fd27bec-8743-4eb3-a44c-fd063ea62021
- model: profile.profile
pk: 87e355dd-1898-4a0a-81c3-1e9ac8473143
fields:
user: 4ac96f68-42cf-47ea-bffb-f24d423dbc35
rcrainfo_profile: 192c73f4-24f1-4f21-8239-dee2da43c547
- model: profile.rcrainfositeaccess
pk: 1
fields:
site: 1
profile: 192c73f4-24f1-4f21-8239-dee2da43c547
site_manager: true
annual_report: Certifier
biennial_report: Certifier
e_manifest: Certifier
my_rcra_id: Certifier
wiets: Certifier
Loading

0 comments on commit 9f34311

Please sign in to comment.