Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added openedx/tests/__init__.py
Empty file.
7 changes: 7 additions & 0 deletions openedx/tests/xblock_integration/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Tests of XBlocks integrated with edx-platform.

These tests exercise XBlocks which may live in other repos, to confirm both
that the XBlock works, and that edx-platform continues to properly support the
XBlock.

"""
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@
This test file will run through some XBlock test scenarios regarding the
recommender system
"""

from copy import deepcopy
import json
import itertools
import StringIO
import unittest

from ddt import ddt, data
from copy import deepcopy
from nose.plugins.attrib import attr

from django.conf import settings
from django.core.urlresolvers import reverse

from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase

from courseware.tests.helpers import LoginEnrollmentTestCase
from courseware.tests.factories import GlobalStaffFactory

from lms.djangoapps.courseware.tests.helpers import LoginEnrollmentTestCase
from lms.djangoapps.courseware.tests.factories import GlobalStaffFactory
from lms.djangoapps.lms_xblock.runtime import quote_slashes


Expand All @@ -32,6 +35,12 @@ class TestRecommender(SharedModuleStoreTestCase, LoginEnrollmentTestCase):

@classmethod
def setUpClass(cls):
# Nose runs setUpClass methods even if a class decorator says to skip
# the class: https://github.com/nose-devs/nose/issues/946
# So, skip the test class here if we are not in the LMS.
if settings.ROOT_URLCONF != 'lms.urls':
raise unittest.SkipTest('Test only valid in lms')

super(TestRecommender, cls).setUpClass()
cls.course = CourseFactory.create(
display_name='Recommender_Test_Course'
Expand Down
15 changes: 9 additions & 6 deletions pavelib/utils/test/suites/nose_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,23 @@ def _default_test_id(self):
# django-nose will import them early in the test process,
# thereby making sure that we load any django models that are
# only defined in test files.
default_test_id = "{system}/djangoapps/* common/djangoapps/* openedx/core/djangoapps/*".format(
system=self.root
default_test_id = (
"{system}/djangoapps/*"
" common/djangoapps/*"
" openedx/core/djangoapps/*"
" openedx/tests/*"
)

if self.root in ('lms', 'cms'):
default_test_id += " {system}/lib/*".format(system=self.root)
default_test_id += " {system}/lib/*"

if self.root == 'lms':
default_test_id += " {system}/tests.py".format(system=self.root)
default_test_id += " {system}/tests.py"

if self.root == 'cms':
default_test_id += " {system}/tests/*".format(system=self.root)
default_test_id += " {system}/tests/*"

return default_test_id
return default_test_id.format(system=self.root)


class LibTestSuite(NoseTestSuite):
Expand Down