Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.

This commit is contained in:
Tim Graham 2016-12-07 17:42:31 -05:00 committed by GitHub
parent f909fa84be
commit b5f0b3478d
27 changed files with 84 additions and 104 deletions

View file

@ -1,17 +1,15 @@
from unittest import TestCase
from django import get_version
from django.utils import six
from django.test import SimpleTestCase
class VersionTests(TestCase):
class VersionTests(SimpleTestCase):
def test_development(self):
ver_tuple = (1, 4, 0, 'alpha', 0)
# This will return a different result when it's run within or outside
# of a git clone: 1.4.devYYYYMMDDHHMMSS or 1.4.
ver_string = get_version(ver_tuple)
six.assertRegex(self, ver_string, r'1\.4(\.dev[0-9]+)?')
self.assertRegex(ver_string, r'1\.4(\.dev[0-9]+)?')
def test_releases(self):
tuples_to_strings = (