You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.rst
+14
Original file line number
Diff line number
Diff line change
@@ -122,13 +122,27 @@ Create development virtualenv (you need to have tox installed in your base syste
122
122
tox -e dev
123
123
source .tox/dev/bin/activate
124
124
125
+
To run the test project, with the folder of the project as the current directory, run::
126
+
127
+
export PYTHONPATH="${PYTHONPATH}:/app/src"
128
+
docker run -d postgres -p 5432:5432
129
+
130
+
125
131
Then run the full import::
126
132
127
133
test_project/manage.py migrate
128
134
test_project/manage.py cities_light
129
135
130
136
There are several environment variables which affect project settings (like DB_ENGINE and CI), you can find them all in test_project/settings.py.
131
137
138
+
For example to change the database engine, you can run::
139
+
140
+
export DB_ENGINE=postgresql
141
+
export DB_HOST=192.168.0.118
142
+
export DB_NAME=app
143
+
export DB_USER=postgres
144
+
export DB_PORT=5432
145
+
132
146
To run the test suite you need to have postgresql or mysql installed with passwordless login, or just use sqlite. Otherwise the tests which try to create/drop database will fail.
0 commit comments