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 @@
...
@@ -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 @@
...
@@ -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 @@
...
@@ -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 @@
...
@@ -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 @@
...
@@ -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 @@
...
@@ -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 @@
...
@@ -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"
,
...
...
pavelib/utils/test/suites/bokchoy_suite.py
View file @
7cdeb330
...
@@ -77,6 +77,9 @@ class BokChoyTestSuite(TestSuite):
...
@@ -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):
...
@@ -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):
...
@@ -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.
...
...
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