deprecate django unittest
parent
d710f8e25f
commit
146f26c5f8
|
@ -5,9 +5,10 @@ import os
|
|||
from datetime import datetime, timedelta
|
||||
from decimal import Decimal as D
|
||||
from math import factorial
|
||||
from time import sleep, mktime
|
||||
import unittest
|
||||
from urlparse import parse_qs, urlparse
|
||||
from tempfile import NamedTemporaryFile
|
||||
from time import sleep, mktime
|
||||
|
||||
from celery.task.sets import TaskSet
|
||||
import requests
|
||||
|
@ -25,7 +26,6 @@ from django.http import Http404
|
|||
from django.test import TestCase
|
||||
from django.test.client import Client
|
||||
from django.test.utils import override_settings
|
||||
from django.utils import unittest
|
||||
|
||||
from django_comments.models import Comment
|
||||
|
||||
|
@ -162,7 +162,7 @@ class BookLoaderTests(TestCase):
|
|||
if not (mocking or settings.TEST_INTEGRATION):
|
||||
return
|
||||
edition = bookloader.add_by_isbn('9787104030126')
|
||||
self.assertEqual(edition.work.language, 'zh-CN')
|
||||
self.assertEqual(edition.work.language, u'zh-CN')
|
||||
|
||||
def test_update_edition_mock(self):
|
||||
with requests_mock.Mocker(real_http=True) as m:
|
||||
|
|
|
@ -6,12 +6,15 @@ external library imports
|
|||
"""
|
||||
import logging
|
||||
import json
|
||||
import re
|
||||
import stripe
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from itertools import islice
|
||||
from pytz import utc
|
||||
import re
|
||||
import unittest
|
||||
from unittest import TestCase
|
||||
|
||||
import stripe
|
||||
|
||||
"""
|
||||
django imports
|
||||
|
@ -73,12 +76,6 @@ def grouper(iterable, page_size):
|
|||
class StripelibError(baseprocessor.ProcessorError):
|
||||
pass
|
||||
|
||||
try:
|
||||
import unittest
|
||||
from unittest import TestCase
|
||||
except:
|
||||
from django.test import TestCase
|
||||
from django.utils import unittest
|
||||
|
||||
# if customer.id doesn't exist, create one and then charge the customer
|
||||
# we probably should ask our users whether they are ok with our creating a customer id account -- or ask for credit
|
||||
|
|
|
@ -5,6 +5,7 @@ import logging
|
|||
import os
|
||||
import time
|
||||
import traceback
|
||||
import unittest
|
||||
|
||||
from datetime import timedelta
|
||||
from decimal import Decimal as D
|
||||
|
@ -19,7 +20,6 @@ from django.contrib.auth.models import User
|
|||
from django.core.exceptions import ValidationError
|
||||
from django.core.validators import URLValidator
|
||||
from django.test import TestCase
|
||||
from django.utils import unittest
|
||||
|
||||
"""
|
||||
regluit imports
|
||||
|
|
Loading…
Reference in New Issue