load db_fixures when run with --testsonly
revert shell script change
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
"pk": 99,
|
"pk": 99,
|
||||||
"model": "certificates.certificategenerationconfiguration",
|
"model": "certificates.certificategenerationconfiguration",
|
||||||
"fields": {
|
"fields": {
|
||||||
"change_date": "2015-06-18 11:02:13",
|
"change_date": "2015-06-18 11:02:13.007790+00:00",
|
||||||
"changed_by": 99,
|
"changed_by": 99,
|
||||||
"enabled": true
|
"enabled": true
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
"pk": 99,
|
"pk": 99,
|
||||||
"model": "certificates.certificategenerationcoursesetting",
|
"model": "certificates.certificategenerationcoursesetting",
|
||||||
"fields": {
|
"fields": {
|
||||||
"modified": "2015-06-18 11:02:13",
|
"modified": "2015-06-18 11:02:13.007790+00:00",
|
||||||
"course_key": "course-v1:test_org+3355358979513794782079645765720179311111+test_run",
|
"course_key": "course-v1:test_org+3355358979513794782079645765720179311111+test_run",
|
||||||
"enabled": true
|
"enabled": true
|
||||||
}
|
}
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
"pk": 99,
|
"pk": 99,
|
||||||
"model": "auth.user",
|
"model": "auth.user",
|
||||||
"fields": {
|
"fields": {
|
||||||
"date_joined": "2015-06-12 11:02:13",
|
"date_joined": "2015-06-12 11:02:13.007790+00:00",
|
||||||
"username": "testcert",
|
"username": "testcert",
|
||||||
"first_name": "john",
|
"first_name": "john",
|
||||||
"last_name": "doe",
|
"last_name": "doe",
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
"pk": 2,
|
"pk": 2,
|
||||||
"model": "certificates.certificatehtmlviewconfiguration",
|
"model": "certificates.certificatehtmlviewconfiguration",
|
||||||
"fields": {
|
"fields": {
|
||||||
"change_date": "2050-05-15 11:02:13",
|
"change_date": "2050-05-15 11:02:13.007790+00:00",
|
||||||
"changed_by": 99,
|
"changed_by": 99,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"configuration": "{\"default\": {\"accomplishment_class_append\": \"accomplishment-certificate\",\"platform_name\": \"edX\",\"company_privacy_url\": \"http://www.edx.org/edx-privacy-policy\",\"company_about_url\": \"http://www.edx.org/about-us\",\"company_tos_url\": \"http://www.edx.org/edx-terms-service\",\"company_verified_certificate_url\": \"http://www.edx.org/verified-certificate\",\"document_stylesheet_url_application\": \"/static/certificates/sass/main-ltr.css\",\"logo_src\": \"/static/certificates/images/logo-edx.svg\",\"logo_url\": \"http://www.edx.org\"},\"honor\": {\"certificate_type\": \"Honor Code\",\"document_body_class_append\": \"is-honorcode\"},\"verified\": {\"certificate_type\": \"Verified\",\"document_body_class_append\": \"is-idverified\"},\"xseries\": {\"certificate_type\": \"XSeries\",\"document_body_class_append\": \"is-xseries\"}}"
|
"configuration": "{\"default\": {\"accomplishment_class_append\": \"accomplishment-certificate\",\"platform_name\": \"edX\",\"company_privacy_url\": \"http://www.edx.org/edx-privacy-policy\",\"company_about_url\": \"http://www.edx.org/about-us\",\"company_tos_url\": \"http://www.edx.org/edx-terms-service\",\"company_verified_certificate_url\": \"http://www.edx.org/verified-certificate\",\"document_stylesheet_url_application\": \"/static/certificates/sass/main-ltr.css\",\"logo_src\": \"/static/certificates/images/logo-edx.svg\",\"logo_url\": \"http://www.edx.org\"},\"honor\": {\"certificate_type\": \"Honor Code\",\"document_body_class_append\": \"is-honorcode\"},\"verified\": {\"certificate_type\": \"Verified\",\"document_body_class_append\": \"is-idverified\"},\"xseries\": {\"certificate_type\": \"XSeries\",\"document_body_class_append\": \"is-xseries\"}}"
|
||||||
@@ -73,8 +73,8 @@
|
|||||||
"verify_uuid": "52bfac10394d49219385dcd4cc17177e",
|
"verify_uuid": "52bfac10394d49219385dcd4cc17177e",
|
||||||
"download_uuid": "52bfac10394d49219385dcd4cc17177r",
|
"download_uuid": "52bfac10394d49219385dcd4cc17177r",
|
||||||
"name": "testcert",
|
"name": "testcert",
|
||||||
"created_date": "2015-06-12 11:02:13",
|
"created_date": "2015-06-12 11:02:13.007790+00:00",
|
||||||
"modified_date": "2015-06-12 11:02:13",
|
"modified_date": "2015-06-12 11:02:13.007790+00:00",
|
||||||
"error_reason": "",
|
"error_reason": "",
|
||||||
"mode": "honor"
|
"mode": "honor"
|
||||||
}
|
}
|
||||||
@@ -93,8 +93,8 @@
|
|||||||
"verify_uuid": "52bfac10394d49219385dcd4cc17177e",
|
"verify_uuid": "52bfac10394d49219385dcd4cc17177e",
|
||||||
"download_uuid": "52bfac10394d49219385dcd4cc17177r",
|
"download_uuid": "52bfac10394d49219385dcd4cc17177r",
|
||||||
"name": "testcert",
|
"name": "testcert",
|
||||||
"created_date": "2015-06-12 11:02:13",
|
"created_date": "2015-06-12 11:02:13.007790+00:00",
|
||||||
"modified_date": "2015-06-12 11:02:13",
|
"modified_date": "2015-06-12 11:02:13.007790+00:00",
|
||||||
"error_reason": "",
|
"error_reason": "",
|
||||||
"mode": "honor"
|
"mode": "honor"
|
||||||
}
|
}
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
"pk": 1,
|
"pk": 1,
|
||||||
"model": "student.linkedinaddtoprofileconfiguration",
|
"model": "student.linkedinaddtoprofileconfiguration",
|
||||||
"fields": {
|
"fields": {
|
||||||
"change_date": "2050-06-15 11:02:13",
|
"change_date": "2050-06-15 11:02:13.007790+00:00",
|
||||||
"changed_by": 99,
|
"changed_by": 99,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"dashboard_tracking_code": "edx-course-v1&TESTCOURSE",
|
"dashboard_tracking_code": "edx-course-v1&TESTCOURSE",
|
||||||
|
|||||||
@@ -77,6 +77,9 @@ class BokChoyTestSuite(TestSuite):
|
|||||||
|
|
||||||
if not self.testsonly:
|
if not self.testsonly:
|
||||||
self.prepare_bokchoy_run()
|
self.prepare_bokchoy_run()
|
||||||
|
else:
|
||||||
|
# load data in db_fixtures
|
||||||
|
self.load_data()
|
||||||
|
|
||||||
msg = colorize('green', "Confirming servers have started...")
|
msg = colorize('green', "Confirming servers have started...")
|
||||||
print msg
|
print msg
|
||||||
@@ -147,13 +150,8 @@ class BokChoyTestSuite(TestSuite):
|
|||||||
bokchoy_utils.clear_mongo()
|
bokchoy_utils.clear_mongo()
|
||||||
self.cache.flush_all()
|
self.cache.flush_all()
|
||||||
|
|
||||||
sh(
|
# load data in db_fixtures
|
||||||
"DEFAULT_STORE={default_store}"
|
self.load_data()
|
||||||
" ./manage.py lms --settings bok_choy loaddata --traceback"
|
|
||||||
" common/test/db_fixtures/*.json".format(
|
|
||||||
default_store=self.default_store,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
if self.imports_dir:
|
if self.imports_dir:
|
||||||
sh(
|
sh(
|
||||||
@@ -169,6 +167,19 @@ class BokChoyTestSuite(TestSuite):
|
|||||||
print msg
|
print msg
|
||||||
bokchoy_utils.start_servers(self.default_store, self.coveragerc)
|
bokchoy_utils.start_servers(self.default_store, self.coveragerc)
|
||||||
|
|
||||||
|
def load_data(self):
|
||||||
|
"""
|
||||||
|
Loads data into database from db_fixtures
|
||||||
|
"""
|
||||||
|
print 'Loading data from json fixtures in db_fixtures directory'
|
||||||
|
sh(
|
||||||
|
"DEFAULT_STORE={default_store}"
|
||||||
|
" ./manage.py lms --settings bok_choy loaddata --traceback"
|
||||||
|
" common/test/db_fixtures/*.json".format(
|
||||||
|
default_store=self.default_store,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
def run_servers_continuously(self):
|
def run_servers_continuously(self):
|
||||||
"""
|
"""
|
||||||
Infinite loop. Servers will continue to run in the current session unless interrupted.
|
Infinite loop. Servers will continue to run in the current session unless interrupted.
|
||||||
|
|||||||
Reference in New Issue
Block a user