mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #25186 -- Improved migration's serialization of builtins on Python 2.
This commit is contained in:
parent
5d60d2b457
commit
b1e552debf
2 changed files with 8 additions and 0 deletions
|
@ -359,6 +359,11 @@ class WriterTests(SimpleTestCase):
|
|||
self.assertSerializedEqual(one_item_tuple)
|
||||
self.assertSerializedEqual(many_items_tuple)
|
||||
|
||||
def test_serialize_builtins(self):
|
||||
string, imports = MigrationWriter.serialize(range)
|
||||
self.assertEqual(string, 'range')
|
||||
self.assertEqual(imports, set())
|
||||
|
||||
@unittest.skipUnless(six.PY2, "Only applies on Python 2")
|
||||
def test_serialize_direct_function_reference(self):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue