Skip to content

Commit 558be04

Browse files
committed
chore: remove unused
1 parent f511c46 commit 558be04

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

tests/test_index.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from django.test import TestCase
2-
from django.db import models
32

43
from django.contrib.algoliasearch import AlgoliaIndex
54
from django.contrib.algoliasearch import algolia_engine
@@ -167,19 +166,17 @@ class ExampleIndex(AlgoliaIndex):
167166
fields = ('name', 'color')
168167

169168
with self.assertRaises(AlgoliaIndexError):
170-
index = ExampleIndex(Example, self.client)
169+
ExampleIndex(Example, self.client)
171170

172171
def test_should_index_method(self):
173172
class ExampleIndex(AlgoliaIndex):
174173
fields = 'name'
175174
should_index = 'has_name'
176175
index = ExampleIndex(Example, self.client)
177-
obj = index._build_object(self.instance)
178176
self.assertTrue(index._should_index(self.instance),
179177
"We should index an instance when should_index(instance) returns True")
180178

181179
instance_should_not = Example(name=None)
182-
obj = index._build_object(instance_should_not)
183180
self.assertFalse(index._should_index(instance_should_not),
184181
"We should not index an instance when should_index(instance) returns False")
185182

@@ -188,7 +185,6 @@ class ExampleIndex(AlgoliaIndex):
188185
fields = 'name'
189186
should_index = 'static_should_index'
190187
index = ExampleIndex(Example, self.client)
191-
obj = index._build_object(self.instance)
192188
self.assertTrue(index._should_index(self.instance),
193189
"We should index an instance when should_index() returns True")
194190

@@ -197,7 +193,6 @@ class ExampleIndex(AlgoliaIndex):
197193
should_index = 'static_should_not_index'
198194
index = ExampleIndex(Example, self.client)
199195
instance_should_not = Example()
200-
obj = index._build_object(instance_should_not)
201196
self.assertFalse(index._should_index(instance_should_not),
202197
"We should not index an instance when should_index() returns False")
203198

0 commit comments

Comments
 (0)