Skip to content

Commit 93a0df6

Browse files
committed
Add documentation for running tests.
1 parent e891922 commit 93a0df6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,20 @@ python3 manage.py runserver
8484
```
8585
7. Now open localhost:8000 in the browser
8686

87+
## Running tests
88+
89+
When running tests, Django creates a test replica of the database in order for the tests not to change the data on the real database. Because of that you need to alter the Postgres user that you created and add to it the `CREATEDB` priviledge:
90+
91+
```
92+
ALTER USER rescueuser CREATEDB;
93+
```
94+
95+
To run the tests, run this command:
96+
97+
```
98+
python3 manage.py test --settings=floodrelief.test_settings
99+
```
100+
87101
## How can you help?
88102

89103
### By testing

0 commit comments

Comments
 (0)