mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
[1.10.x] Fixed #26747 -- Used more specific assertions in the Django test suite.
Backport of 4f336f6652 from master
This commit is contained in:
@@ -146,7 +146,7 @@ class NoNameFileTestCase(unittest.TestCase):
|
||||
urllib.urlopen()
|
||||
"""
|
||||
def test_noname_file_default_name(self):
|
||||
self.assertEqual(File(BytesIO(b'A file with no name')).name, None)
|
||||
self.assertIsNone(File(BytesIO(b'A file with no name')).name)
|
||||
|
||||
def test_noname_file_get_size(self):
|
||||
self.assertEqual(File(BytesIO(b'A file with no name')).size, 19)
|
||||
@@ -154,7 +154,7 @@ class NoNameFileTestCase(unittest.TestCase):
|
||||
|
||||
class ContentFileTestCase(unittest.TestCase):
|
||||
def test_content_file_default_name(self):
|
||||
self.assertEqual(ContentFile(b"content").name, None)
|
||||
self.assertIsNone(ContentFile(b"content").name)
|
||||
|
||||
def test_content_file_custom_name(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user