def test_deconstruct_kwargs_kept(self): instance = TaggableManager(through=OfficialThroughModel, to='dummy.To') name, path, args, kwargs = instance.deconstruct() new_instance = TaggableManager(*args, **kwargs) self.assertEqual('tests.OfficialThroughModel', new_instance.rel.through) self.assertEqual('dummy.To', new_instance.rel.to)
def test_deconstruct_kwargs_kept(self): instance = TaggableManager(through=OfficialThroughModel, to="dummy.To") name, path, args, kwargs = instance.deconstruct() new_instance = TaggableManager(*args, **kwargs) self.assertEqual("tests.OfficialThroughModel", new_instance.remote_field.through) self.assertEqual("dummy.To", new_instance.remote_field.model)
def test_deconstruct_kwargs_kept(self): instance = TaggableManager(through=OfficialThroughModel, to="dummy.To") name, path, args, kwargs = instance.deconstruct() new_instance = TaggableManager(*args, **kwargs) self.assertEqual( "tests.OfficialThroughModel", new_instance.remote_field.through ) self.assertEqual("dummy.To", new_instance.remote_field.model)
def test_deconstruct_kwargs_kept(self): instance = TaggableManager(through=OfficialThroughModel, to='dummy.To') name, path, args, kwargs = instance.deconstruct() new_instance = TaggableManager(*args, **kwargs) self.assertEqual('tests.OfficialThroughModel', _remote_field(new_instance).through) self.assertEqual('dummy.To', _related_model(_remote_field(new_instance)))
def test_deconstruct_kwargs_kept(self): instance = TaggableManager(through=OfficialThroughModel) name, path, args, kwargs = instance.deconstruct() new_instance = TaggableManager(*args, **kwargs) self.assertEqual(instance.rel.through, new_instance.rel.through)
def test_deconstruct_kwargs_kept(self): instance = TaggableManager(through=OfficialThroughModel) name, path, args, kwargs = instance.deconstruct() new_instance = TaggableManager(*args, **kwargs) self.assertEqual(instance.rel.through, new_instance.rel.through)