search optimization broken by tags
This commit is contained in:
@@ -380,6 +380,7 @@ class ProductSearchTest(TestCase):
|
||||
def test_anon_user_can_search(self):
|
||||
self.factory(description="zapatos")
|
||||
self.factory(tags="rojos")
|
||||
# self.factory(tags="azul")
|
||||
|
||||
query_string = quote("zapatos rojos")
|
||||
|
||||
@@ -390,7 +391,8 @@ class ProductSearchTest(TestCase):
|
||||
# check re sponse
|
||||
self.assertEqual(response.status_code, 200)
|
||||
# check for object creation
|
||||
self.assertEquals(2, self.model.objects.count())
|
||||
data = json.loads(response.data)
|
||||
self.assertEquals(len(data), self.model.objects.count())
|
||||
|
||||
|
||||
class MyProductsViewTest(APITestCase):
|
||||
|
||||
Reference in New Issue
Block a user