예제 #1
0
 def test_deconstruction_no_customization(self):
     index = GistIndex(fields=['title'], name='test_title_gist')
     path, args, kwargs = index.deconstruct()
     self.assertEqual(path, 'django.contrib.postgres.indexes.GistIndex')
     self.assertEqual(args, ())
     self.assertEqual(kwargs, {
         'fields': ['title'],
         'name': 'test_title_gist'
     })
예제 #2
0
 def test_deconstruction(self):
     index = GistIndex(fields=['title'], name='test_title_gist', buffering=False, fillfactor=80)
     path, args, kwargs = index.deconstruct()
     self.assertEqual(path, 'django.contrib.postgres.indexes.GistIndex')
     self.assertEqual(args, ())
     self.assertEqual(kwargs, {
         'fields': ['title'],
         'name': 'test_title_gist',
         'buffering': False,
         'fillfactor': 80,
     })
예제 #3
0
 def test_deconstruction(self):
     index = GistIndex(fields=['title'], name='test_title_gist', buffering=False, fillfactor=80)
     path, args, kwargs = index.deconstruct()
     self.assertEqual(path, 'django.contrib.postgres.indexes.GistIndex')
     self.assertEqual(args, ())
     self.assertEqual(kwargs, {
         'fields': ['title'],
         'name': 'test_title_gist',
         'buffering': False,
         'fillfactor': 80,
     })
예제 #4
0
 def test_deconstruction(self):
     index = GistIndex(
         fields=["title"], name="test_title_gist", buffering=False, fillfactor=80
     )
     path, args, kwargs = index.deconstruct()
     self.assertEqual(path, "django.contrib.postgres.indexes.GistIndex")
     self.assertEqual(args, ())
     self.assertEqual(
         kwargs,
         {
             "fields": ["title"],
             "name": "test_title_gist",
             "buffering": False,
             "fillfactor": 80,
         },
     )
예제 #5
0
 def test_deconstruction_no_customization(self):
     index = GistIndex(fields=['title'], name='test_title_gist')
     path, args, kwargs = index.deconstruct()
     self.assertEqual(path, 'django.contrib.postgres.indexes.GistIndex')
     self.assertEqual(args, ())
     self.assertEqual(kwargs, {'fields': ['title'], 'name': 'test_title_gist'})