Skip to content

Commit

Permalink
Add test command for local migration testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Vetter committed Dec 20, 2013
1 parent 1997a82 commit 9d013e4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.sw[po]
*.py[co]
*.sqlite3
*.sqlite
*.vagrant
*.coverage

Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ compile-static:
lessc ${STATIC_DIR}less/assets.less > ${STATIC_DIR}css/assets.css
lessc ${STATIC_DIR}less/page.less > ${STATIC_DIR}css/page.css

test: test-fancypages test-oscar-fancypages
test: test-fancypages test-oscar-fancypages test-migration-sqlite

travis:
${MAKE} test-fancypages
Expand All @@ -24,3 +24,7 @@ test-fancypages:
test-oscar-fancypages:
USE_OSCAR_SANDBOX=true py.test --pep8 --cov fancypages
USE_OSCAR_SANDBOX=true py.test -m integration

test-migration-sqlite:
- rm sandboxes/oscar_fancypages/sandbox/migration_test.sqlite
./sandboxes/oscar_fancypages/manage.py syncdb --noinput --migrate --settings=sandbox.settings_migration_sqlite
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from sandbox.settings import *

# Setting to use with vagrant and 'mysql' or 'postgres'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(os.path.dirname(__file__), 'migration_test.sqlite'),
}
}

0 comments on commit 9d013e4

Please sign in to comment.