diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py index ce956fa5ad..b7c55389b6 100644 --- a/cms/djangoapps/contentstore/tests/tests.py +++ b/cms/djangoapps/contentstore/tests/tests.py @@ -193,6 +193,7 @@ class EditTestCase(ContentStoreTestCase): self.activate_user(email) self.login(email, password) xmodule.modulestore.django._MODULESTORES = {} + xmodule.modulestore.django.modulestore().collection.drop() def check_edit_item(self, test_course_name): import_from_xml('common/test/data/', test_course_name) diff --git a/cms/envs/test.py b/cms/envs/test.py index 28dce36682..bce3c796cf 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -22,9 +22,21 @@ TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' TEST_ROOT = path('test_root') # Want static files in the same dir for running on jenkins. -STATIC_ROOT = TEST_ROOT / "staticfiles" +STATIC_ROOT = TEST_ROOT / "staticfiles" GITHUB_REPO_ROOT = TEST_ROOT / "data" +COMMON_TEST_DATA_ROOT = COMMON_ROOT / "test" / "data" + +# TODO (cpennington): We need to figure out how envs/test.py can inject things into common.py so that we don't have to repeat this sort of thing +STATICFILES_DIRS = [ + COMMON_ROOT / "static", + PROJECT_ROOT / "static", +] +STATICFILES_DIRS += [ + (course_dir, COMMON_TEST_DATA_ROOT / course_dir) + for course_dir in os.listdir(COMMON_TEST_DATA_ROOT) + if os.path.isdir(COMMON_TEST_DATA_ROOT / course_dir) +] MODULESTORE = { 'default': { diff --git a/lms/static/images/mute.png b/common/static/images/mute.png similarity index 100% rename from lms/static/images/mute.png rename to common/static/images/mute.png diff --git a/common/test/data/full/custom_tags/slides b/common/test/data/full/custom_tags/slides index 7a33ffd6c7..a93d94947c 100644 --- a/common/test/data/full/custom_tags/slides +++ b/common/test/data/full/custom_tags/slides @@ -1 +1 @@ -Lecture Slides Handout [Clean ][Annotated] \ No newline at end of file +Lecture Slides Handout [Clean ][Annotated] diff --git a/common/test/data/full/handouts/schematic_tutorial.pdf b/common/test/data/full/handouts/schematic_tutorial.pdf new file mode 100644 index 0000000000..1de809404d Binary files /dev/null and b/common/test/data/full/handouts/schematic_tutorial.pdf differ diff --git a/common/test/data/full/info/guest_handouts.html b/common/test/data/full/info/guest_handouts.html deleted file mode 100644 index 27827b9660..0000000000 --- a/common/test/data/full/info/guest_handouts.html +++ /dev/null @@ -1,119 +0,0 @@ -
-

Handouts

-
- -
    -
  1. Syllabus
  2. -
  3. 6.002x At-A-Glance (calendar)
  4. -
  5. Staff Listing
  6. -
  7. Math Review
  8. -
  9. Using the Interactive Laboratory
  10. -
  11. How to Use the System
  12. -
  13. How to Use the Question/Answer forum
  14. - -
  15. -

    Lecture Slides

    - -
  16. - -
diff --git a/common/test/data/full/info/handouts.html b/common/test/data/full/info/handouts.html deleted file mode 100644 index e13dad43b1..0000000000 --- a/common/test/data/full/info/handouts.html +++ /dev/null @@ -1,169 +0,0 @@ -
-

Handouts

-
- -
    -
  1. Syllabus
  2. -
  3. 6.002x At-A-Glance (calendar)
  4. -
  5. Staff Listing
  6. -
  7. Math Review
  8. -
  9. Using the Interactive Laboratory
  10. -
  11. How to Use the System
  12. -
  13. How to Use the Question/Answer forum
  14. - -
  15. -

    Lecture Slides

    - -
  16. -
  17. -

    Weekly solutions

    - - -
  18. -
  19. -

    Midterm Review Problems

    -

    Clean With Solutions

    -
  20. -
  21. Midterm Solutions
  22. -
diff --git a/lms/envs/test.py b/lms/envs/test.py index d52468989e..fdfbfb20c4 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -46,6 +46,19 @@ LOGGING = get_logger_config(TEST_ROOT / "log", tracking_filename="tracking.log", debug=True) +COMMON_TEST_DATA_ROOT = COMMON_ROOT / "test" / "data" + +# TODO (cpennington): We need to figure out how envs/test.py can inject things into common.py so that we don't have to repeat this sort of thing +STATICFILES_DIRS = [ + COMMON_ROOT / "static", + PROJECT_ROOT / "static", +] +STATICFILES_DIRS += [ + (course_dir, COMMON_TEST_DATA_ROOT / course_dir) + for course_dir in os.listdir(COMMON_TEST_DATA_ROOT) + if os.path.isdir(COMMON_TEST_DATA_ROOT / course_dir) +] + DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3',