コード例 #1
0
 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)
コード例 #2
0
 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)
コード例 #3
0
ファイル: tests.py プロジェクト: alex/django-taggit
 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)
コード例 #4
0
ファイル: tests.py プロジェクト: izquierdo/django-taggit
 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)))
コード例 #5
0
ファイル: tests.py プロジェクト: willmitchell/django-taggit
 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)
コード例 #6
0
ファイル: tests.py プロジェクト: JosephBuchma/django-taggit
 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)