mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-14 00:27:06 +02:00
Refactor fixtures from JSON to Python
This commit is contained in:
parent
ba7c0b9e8d
commit
df265b10f8
10 changed files with 426 additions and 270 deletions
|
@ -38,6 +38,12 @@ If you run via `docker-compose up -d`, you can get logs with `docker-compose log
|
|||
|
||||
You can change the logging verbosity, if needed. Do a web search for "django log level".
|
||||
|
||||
## Mock data
|
||||
|
||||
There is a `post_migrate` signal in [signals.py](../../src/registrar/signals.py) that will load the fixtures from [fixtures.py](../../src/registrar/fixtures.py), giving you some test data to play with while developing.
|
||||
|
||||
See the [database-access README](./database-access.md) for information on how to pull data to update these fixtures.
|
||||
|
||||
## Running tests
|
||||
|
||||
Crash course on Docker's `run` vs `exec`: in order to run the tests inside of a container, a container must be running. If you already have a container running, you can use `exec`. If you do not, you can use `run`, which will attempt to start one.
|
||||
|
|
|
@ -24,7 +24,7 @@ cf run-task getgov-unstable --command 'python manage.py migrate' --name migrate
|
|||
Optionally, load data from fixtures as well
|
||||
|
||||
```shell
|
||||
cf run-task getgov-unstable --wait --command 'python manage.py loaddata registrar/fixtures/*' --name loaddata
|
||||
cf run-task getgov-unstable --wait --command 'python manage.py load' --name loaddata
|
||||
```
|
||||
|
||||
For the `staging` environment, developers don't have credentials so we need to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue