#24278: squashmigrations throws ValueError: need more than 1 value to unpack
----------------------------+------------------------------------
     Reporter:  riklaunim   |                    Owner:  knbk
         Type:  Bug         |                   Status:  assigned
    Component:  Migrations  |                  Version:  1.7
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+------------------------------------

Comment (by knbk):

 Failing test case:

 {{{
 diff --git a/tests/migrations/test_writer.py
 b/tests/migrations/test_writer.py
 index 38065fb..4130e32 100644
 --- a/tests/migrations/test_writer.py
 +++ b/tests/migrations/test_writer.py
 @@ -346,6 +346,18 @@ class WriterTests(TestCase):
          self.assertSerializedEqual(FoodManager('a', 'b'))
          self.assertSerializedEqual(FoodManager('x', 'y', c=3, d=4))

 +    def test_serialize_operation(self):
 +        """
 +        Tests serializing an operation with MigrationWriter serialize.
 This happens when
 +        serializing an operation within an operation, e.g. with
 SeparateDatabaseAndState.
 +        """
 +        operation = migrations.RenameField(
 +                model_name="SomeModel",
 +                old_name="old_name",
 +                new_name="new_name",
 +            )
 +        self.assertSerializedEqual(operation)
 +
      def test_simple_migration(self):
          """
          Tests serializing a simple migration.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24278#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.e1a20151ab05b51c26f09413853638d8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to