Skip to content

Commit 615c6ed

Browse files
committed
use separate database files for manual- and unit-testing
1 parent 4d139d2 commit 615c6ed

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*.pot
44
*.pyc
55
*.egg-info
6-
*.sqlite
6+
*.sqlite3
77
*.coverage
88
*~
99
.DS_Store
@@ -18,4 +18,3 @@ dist
1818
node_modules/
1919
htmlcov
2020
adminsortable2/static/adminsortable2/js/adminsortable2.*
21-
testapp/test.db

testapp/settings.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@
2222
DATABASES = {
2323
'default': {
2424
'ENGINE': 'django.db.backends.sqlite3',
25-
'NAME': str(Path(__file__).parent / 'test.db'), # live_server requires a file rather than :memory:
25+
'NAME': Path(__file__).parent / 'demo.sqlite3',
26+
'TEST': {
27+
'NAME': Path(__file__).parent / 'test.sqlite3', # live_server requires a file rather than :memory:
28+
'OPTIONS': {
29+
'timeout': 20,
30+
},
31+
},
2632
}
2733
}
2834

0 commit comments

Comments
 (0)