diff --git a/envs/test.py b/envs/test.py index 539d0bd3be..9aa030c15a 100644 --- a/envs/test.py +++ b/envs/test.py @@ -8,6 +8,7 @@ sessions. Assumes structure: /log # Where we're going to write log files """ from common import * +import os INSTALLED_APPS = [ app @@ -16,6 +17,14 @@ INSTALLED_APPS = [ if not app.startswith('askbot') ] +# Nose Test Runner +INSTALLED_APPS += ['django_nose'] +NOSE_ARGS = ['--cover-erase', '--with-xunit', '--with-xcoverage', '--cover-html', '--cover-inclusive'] +for app in os.listdir(PROJECT_ROOT / 'djangoapps'): + NOSE_ARGS += ['--cover-package', app] +TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' + +# Local Directories COURSES_ROOT = PROJECT_ROOT / "test_data" DATA_DIR = COURSES_ROOT MAKO_TEMPLATES['course'] = [DATA_DIR] diff --git a/requirements.txt b/requirements.txt index dc852c7822..e4d01f76e3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,4 +17,4 @@ django-masquerade fs django-jasmine beautifulsoup -requests \ No newline at end of file +requests diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000000..bb7a744104 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,3 @@ +django-nose +coverage +nosexcover diff --git a/test_data/course_settings.py b/test_data/course_settings.py new file mode 100644 index 0000000000..f4e9696d1d --- /dev/null +++ b/test_data/course_settings.py @@ -0,0 +1,28 @@ +GRADER = [ + { + 'type' : "Homework", + 'min_count' : 12, + 'drop_count' : 2, + 'short_label' : "HW", + 'weight' : 0.15, + }, + { + 'type' : "Lab", + 'min_count' : 12, + 'drop_count' : 2, + 'category' : "Labs", + 'weight' : 0.15 + }, + { + 'type' : "Midterm", + 'name' : "Midterm Exam", + 'short_label' : "Midterm", + 'weight' : 0.3, + }, + { + 'type' : "Final", + 'name' : "Final Exam", + 'short_label' : "Final", + 'weight' : 0.4, + } +]