mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.
This commit is contained in:
parent
f909fa84be
commit
b5f0b3478d
27 changed files with 84 additions and 104 deletions
|
@ -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 = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue