mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #33916 -- Added support for serialization of enum.Flag in migrations.
This commit is contained in:
committed by
Mariusz Felisiak
parent
b30c0081d4
commit
16fffc829c
@@ -413,6 +413,14 @@ class WriterTests(SimpleTestCase):
|
||||
"(2, migrations.test_writer.IntFlagEnum['B'])], "
|
||||
"default=migrations.test_writer.IntFlagEnum['A'])",
|
||||
)
|
||||
self.assertSerializedResultEqual(
|
||||
IntFlagEnum.A | IntFlagEnum.B,
|
||||
(
|
||||
"migrations.test_writer.IntFlagEnum['A'] | "
|
||||
"migrations.test_writer.IntFlagEnum['B']",
|
||||
{"import migrations.test_writer"},
|
||||
),
|
||||
)
|
||||
|
||||
def test_serialize_choices(self):
|
||||
class TextChoices(models.TextChoices):
|
||||
|
||||
Reference in New Issue
Block a user