TE-2524 Stop using nose.plugins - LMS 2

This commit is contained in:
Jeremy Bowman
2018-08-01 13:54:06 -04:00
parent e5b88f864f
commit 4e8668d3be
71 changed files with 91 additions and 135 deletions

View File

@@ -5,13 +5,11 @@ from datetime import timedelta
import ddt
from django.utils.timezone import now
from nose.plugins.attrib import attr
from ..hidden_content import HiddenContentTransformer
from .helpers import BlockParentsMapTestCase, update_block
@attr(shard=3)
@ddt.ddt
class HiddenContentTransformerTestCase(BlockParentsMapTestCase):
"""
@@ -19,6 +17,7 @@ class HiddenContentTransformerTestCase(BlockParentsMapTestCase):
"""
TRANSFORMER_CLASS_TO_TEST = HiddenContentTransformer
ALL_BLOCKS = {0, 1, 2, 3, 4, 5, 6}
shard = 3
class DueDateType(object):
"""

View File

@@ -2,7 +2,6 @@
Tests for SplitTestTransformer.
"""
import ddt
from nose.plugins.attrib import attr
import openedx.core.djangoapps.user_api.course_tag.api as course_tag_api
from openedx.core.djangoapps.user_api.partition_schemes import RandomUserPartitionScheme
@@ -15,7 +14,6 @@ from ..user_partitions import UserPartitionTransformer, _get_user_partition_grou
from .helpers import CourseStructureTestCase, create_location
@attr(shard=3)
@ddt.ddt
class SplitTestTransformerTestCase(CourseStructureTestCase):
"""
@@ -23,6 +21,7 @@ class SplitTestTransformerTestCase(CourseStructureTestCase):
"""
TEST_PARTITION_ID = 0
TRANSFORMER_CLASS_TO_TEST = UserPartitionTransformer
shard = 3
def setUp(self):
"""

View File

@@ -6,7 +6,6 @@ from datetime import timedelta
import ddt
from django.utils.timezone import now
from mock import patch
from nose.plugins.attrib import attr
from courseware.tests.factories import BetaTesterFactory
@@ -14,7 +13,6 @@ from ..start_date import DEFAULT_START_DATE, StartDateTransformer
from .helpers import BlockParentsMapTestCase, update_block
@attr(shard=3)
@ddt.ddt
class StartDateTransformerTestCase(BlockParentsMapTestCase):
"""
@@ -23,6 +21,7 @@ class StartDateTransformerTestCase(BlockParentsMapTestCase):
STUDENT = 1
BETA_USER = 2
TRANSFORMER_CLASS_TO_TEST = StartDateTransformer
shard = 3
class StartDateType(object):
"""

View File

@@ -6,7 +6,6 @@ import string
from collections import namedtuple
import ddt
from nose.plugins.attrib import attr
from openedx.core.djangoapps.course_groups.cohorts import add_user_to_cohort
from openedx.core.djangoapps.course_groups.partition_scheme import CohortPartitionScheme
@@ -69,12 +68,13 @@ class UserPartitionTestMixin(object):
self.partition_cohorts.append(partition_cohorts)
@attr(shard=3)
@ddt.ddt
class UserPartitionTransformerTestCase(UserPartitionTestMixin, CourseStructureTestCase):
"""
UserPartitionTransformer Test
"""
shard = 3
def setup_partitions_and_course(self, active=True):
"""
Setup course structure and create user for user partition
@@ -242,12 +242,13 @@ class UserPartitionTransformerTestCase(UserPartitionTestMixin, CourseStructureTe
)
@attr(shard=3)
@ddt.ddt
class MergedGroupAccessTestData(UserPartitionTestMixin, CourseStructureTestCase):
"""
_MergedGroupAccess Test
"""
shard = 3
def setUp(self):
"""
Setup course structure and create user for user partition

View File

@@ -2,19 +2,18 @@
Tests for VisibilityTransformer.
"""
import ddt
from nose.plugins.attrib import attr
from ..visibility import VisibilityTransformer
from .helpers import BlockParentsMapTestCase, update_block
@attr(shard=3)
@ddt.ddt
class VisibilityTransformerTestCase(BlockParentsMapTestCase):
"""
VisibilityTransformer Test
"""
TRANSFORMER_CLASS_TO_TEST = VisibilityTransformer
shard = 3
# Following test cases are based on BlockParentsMapTestCase.parents_map
@ddt.data(