Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
7cdeb330
Commit
7cdeb330
authored
Dec 30, 2015
by
Zia Fazal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
load db_fixures when run with --testsonly
revert shell script change
parent
5df15fcf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
16 deletions
+27
-16
common/test/db_fixtures/certificates_web_view.json
+9
-9
pavelib/utils/test/suites/bokchoy_suite.py
+18
-7
No files found.
common/test/db_fixtures/certificates_web_view.json
View file @
7cdeb330
...
...
@@ -3,7 +3,7 @@
"pk"
:
99
,
"model"
:
"certificates.certificategenerationconfiguration"
,
"fields"
:
{
"change_date"
:
"2015-06-18 11:02:13"
,
"change_date"
:
"2015-06-18 11:02:13
.007790+00:00
"
,
"changed_by"
:
99
,
"enabled"
:
true
}
...
...
@@ -12,7 +12,7 @@
"pk"
:
99
,
"model"
:
"certificates.certificategenerationcoursesetting"
,
"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"
,
"enabled"
:
true
}
...
...
@@ -21,7 +21,7 @@
"pk"
:
99
,
"model"
:
"auth.user"
,
"fields"
:
{
"date_joined"
:
"2015-06-12 11:02:13"
,
"date_joined"
:
"2015-06-12 11:02:13
.007790+00:00
"
,
"username"
:
"testcert"
,
"first_name"
:
"john"
,
"last_name"
:
"doe"
,
...
...
@@ -53,7 +53,7 @@
"pk"
:
2
,
"model"
:
"certificates.certificatehtmlviewconfiguration"
,
"fields"
:
{
"change_date"
:
"2050-05-15 11:02:13"
,
"change_date"
:
"2050-05-15 11:02:13
.007790+00:00
"
,
"changed_by"
:
99
,
"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
\"
}}"
...
...
@@ -73,8 +73,8 @@
"verify_uuid"
:
"52bfac10394d49219385dcd4cc17177e"
,
"download_uuid"
:
"52bfac10394d49219385dcd4cc17177r"
,
"name"
:
"testcert"
,
"created_date"
:
"2015-06-12 11:02:13"
,
"modified_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
.007790+00:00
"
,
"error_reason"
:
""
,
"mode"
:
"honor"
}
...
...
@@ -93,8 +93,8 @@
"verify_uuid"
:
"52bfac10394d49219385dcd4cc17177e"
,
"download_uuid"
:
"52bfac10394d49219385dcd4cc17177r"
,
"name"
:
"testcert"
,
"created_date"
:
"2015-06-12 11:02:13"
,
"modified_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
.007790+00:00
"
,
"error_reason"
:
""
,
"mode"
:
"honor"
}
...
...
@@ -103,7 +103,7 @@
"pk"
:
1
,
"model"
:
"student.linkedinaddtoprofileconfiguration"
,
"fields"
:
{
"change_date"
:
"2050-06-15 11:02:13"
,
"change_date"
:
"2050-06-15 11:02:13
.007790+00:00
"
,
"changed_by"
:
99
,
"enabled"
:
true
,
"dashboard_tracking_code"
:
"edx-course-v1&TESTCOURSE"
,
...
...
pavelib/utils/test/suites/bokchoy_suite.py
View file @
7cdeb330
...
...
@@ -77,6 +77,9 @@ class BokChoyTestSuite(TestSuite):
if
not
self
.
testsonly
:
self
.
prepare_bokchoy_run
()
else
:
# load data in db_fixtures
self
.
load_data
()
msg
=
colorize
(
'green'
,
"Confirming servers have started..."
)
print
msg
...
...
@@ -147,13 +150,8 @@ class BokChoyTestSuite(TestSuite):
bokchoy_utils
.
clear_mongo
()
self
.
cache
.
flush_all
()
sh
(
"DEFAULT_STORE={default_store}"
" ./manage.py lms --settings bok_choy loaddata --traceback"
" common/test/db_fixtures/*.json"
.
format
(
default_store
=
self
.
default_store
,
)
)
# load data in db_fixtures
self
.
load_data
()
if
self
.
imports_dir
:
sh
(
...
...
@@ -169,6 +167,19 @@ class BokChoyTestSuite(TestSuite):
print
msg
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
):
"""
Infinite loop. Servers will continue to run in the current session unless interrupted.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment