Clean up all modulestore testcases

Move modulestore config for tests to an importable location
Disable pylnt warning for lms imports in common tests
Refactor all testcases that loaded all xml courses
TE-610
TE-489
This commit is contained in:
Jesse Zoldak
2014-11-25 13:33:09 -05:00
parent 8c946f8b37
commit bf3b87bc64
89 changed files with 913 additions and 823 deletions

View File

@@ -1,23 +1,22 @@
# pylint: disable=missing-docstring
from django.core.cache import cache
from django.test.utils import override_settings
from courseware.tests.tests import TEST_DATA_MIXED_MODULESTORE
from lang_pref import LANGUAGE_KEY
from opaque_keys.edx.locations import SlashSeparatedCourseKey
from xmodule.modulestore.tests.django_utils import TEST_DATA_MIXED_TOY_MODULESTORE
from student.models import anonymous_id_for_user
from student.models import UserProfile
from student.roles import CourseStaffRole, CourseInstructorRole
from student.tests.factories import UserFactory, UserProfileFactory
from user_api.models import UserPreference
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
# Will also run default tests for IDTokens and UserInfo
from oauth2_provider.tests import IDTokenTestCase, UserInfoTestCase
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
@override_settings(MODULESTORE=TEST_DATA_MIXED_MODULESTORE)
@override_settings(MODULESTORE=TEST_DATA_MIXED_TOY_MODULESTORE)
class BaseTestMixin(ModuleStoreTestCase):
profile = None