Setup the selenium test environment in Django:
1. install seleniumpip install selenium
2. write some test code
create a test file called 'tests' in a file called 'testsfile'
the Helpful URL part below contains some nice code, try some sample in your tests
3. change the setting file to use a stable test database
(1) create a test database, use a computer enviornment variable which called TEST_DB to make sure only when TEST_DB=1 execute the test database.
import os(this line should put at the top of setting file)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME':
'USER':
'PASSWORD':
'HOST': 'localhost',
'