Answer the question
In order to leave comments, you need to log in
How to change the database for tests?
The manual says that when testing an application, a new database is created and everything goes through it. After passing the tests, it is deleted. But in my case, all tests on the main database pass. After the test, there are new records in the main database. What is the reason for this phenomenon?
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question