From a5207708f8cdd37090ac7b8a56f41e30fb9bee3b Mon Sep 17 00:00:00 2001 From: Will Daly Date: Thu, 6 Feb 2014 10:07:21 -0500 Subject: [PATCH] Added dark lang database fixture to bok choy tests --- common/test/db_fixtures/released_lang.json | 1 + scripts/reset-test-db.sh | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 common/test/db_fixtures/released_lang.json diff --git a/common/test/db_fixtures/released_lang.json b/common/test/db_fixtures/released_lang.json new file mode 100644 index 0000000000..f129e5aa4c --- /dev/null +++ b/common/test/db_fixtures/released_lang.json @@ -0,0 +1 @@ +[{"pk": 1, "model": "dark_lang.darklangconfig", "fields": {"change_date": "2014-01-30T20:34:20Z", "changed_by": null, "enabled": true, "released_languages": "en,eo"}}] diff --git a/scripts/reset-test-db.sh b/scripts/reset-test-db.sh index a0808c208a..582d1ab827 100755 --- a/scripts/reset-test-db.sh +++ b/scripts/reset-test-db.sh @@ -23,6 +23,7 @@ ############################################################################ DB_CACHE_DIR="common/test/db_cache" +DB_FIXTURE_DIR="common/test/db_fixtures" # Clear out the test database ./manage.py lms --settings bok_choy reset_db --traceback --noinput @@ -52,3 +53,5 @@ else mysqldump -u root --no-data --skip-comments --skip-dump-date test > $DB_CACHE_DIR/bok_choy_schema.sql fi +# Load database fixtures +./manage.py lms --settings bok_choy loaddata $DB_FIXTURE_DIR/*.json