Merge pull request #15919 from edx/jmbowman/testcase_usage

Clean up TestCase subclassing
This commit is contained in:
Jeremy Bowman
2017-08-30 10:16:07 -04:00
committed by GitHub
8 changed files with 19 additions and 21 deletions

View File

@@ -1,8 +1,8 @@
"""
Tests for block_structure_factory.py
"""
from django.test import TestCase
from nose.plugins.attrib import attr
from unittest import TestCase
from xmodule.modulestore.exceptions import ItemNotFoundError
from ..store import BlockStructureStore

View File

@@ -2,8 +2,8 @@
Tests for manager.py
"""
import ddt
from django.test import TestCase
from nose.plugins.attrib import attr
from unittest import TestCase
from ..block_structure import BlockStructureBlockData
from ..config import RAISE_ERROR_WHEN_NOT_FOUND, STORAGE_BACKING_FOR_CACHE, waffle

View File

@@ -1,8 +1,8 @@
"""Tests for user API middleware"""
from mock import Mock, patch
from unittest import TestCase
from django.http import HttpResponse
from django.test import TestCase
from django.test.client import RequestFactory
from student.tests.factories import UserFactory, AnonymousUserFactory

View File

@@ -2,8 +2,8 @@
Test the user api's partition extensions.
"""
from collections import defaultdict
from django.test import TestCase
from mock import patch
from unittest import TestCase
from openedx.core.djangoapps.user_api.partition_schemes import RandomUserPartitionScheme, UserPartitionError
from student.tests.factories import UserFactory

View File

@@ -3,10 +3,9 @@ Unit tests for user messages.
"""
import ddt
from unittest import TestCase
from django.contrib.messages.middleware import MessageMiddleware
from django.test import RequestFactory
from django.test import RequestFactory, TestCase
from openedx.core.djangolib.markup import HTML, Text
from student.tests.factories import UserFactory