Answer the question
In order to leave comments, you need to log in
How to properly test django with splinter?
I am using Django 1.8 and selenium.
The workflow is as follows:
- BDD scripts (pytest-bdd) written;
- written steps for tests (pytest-splinter)
- settings file has DB configuration
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
},
}
Answer the question
In order to leave comments, you need to log in
Try to move away from fixtures - no one likes to update them
create a config for tests and inherit it from the base
config progname/settings/
__init__.py
base.py
dev.py
test.py
will launch the skulllight in memory
you will need to run the test pack like this
./manage. py test --settings=progname.settings.test
./manage.py runserver --settings=progname.settings.dev
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question