mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-04 05:24:45 +00:00
Moves an elasticsearch test to all search backends.
This commit is contained in:
parent
9beab7b999
commit
e61980de1c
3 changed files with 8 additions and 4 deletions
|
|
@ -174,6 +174,10 @@ class BackendTests(WagtailTestUtils):
|
|||
results = self.backend.search("World", models.SearchTestChild.objects.filter(id=self.testd.id))
|
||||
self.assertEqual(set(results), {self.testd})
|
||||
|
||||
def test_related_objects_search(self):
|
||||
results = self.backend.search("A subobject", models.SearchTest)
|
||||
self.assertEqual(set(results), {self.testa})
|
||||
|
||||
def test_delete(self):
|
||||
# Delete one of the objects
|
||||
self.backend.delete(self.testa)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@ class TestDBBackend(BackendTests, TestCase):
|
|||
def test_callable_indexed_field(self):
|
||||
super(TestDBBackend, self).test_callable_indexed_field()
|
||||
|
||||
@unittest.expectedFailure
|
||||
def test_related_objects_search(self):
|
||||
super(TestDBBackend, self).test_related_objects_search()
|
||||
|
||||
@unittest.expectedFailure
|
||||
def test_update_index_command(self):
|
||||
super(TestDBBackend, self).test_update_index_command()
|
||||
|
|
|
|||
|
|
@ -90,10 +90,6 @@ class TestElasticsearchSearchBackend(BackendTests, TestCase):
|
|||
self.assertEqual(len(results), 1)
|
||||
self.assertEqual(results[0].id, obj.id)
|
||||
|
||||
def test_related_objects_search(self):
|
||||
results = self.backend.search("A subobject", models.SearchTest)
|
||||
self.assertEqual(set(results), {self.testa})
|
||||
|
||||
def test_ascii_folding(self):
|
||||
# Reset the index
|
||||
self.reset_index()
|
||||
|
|
|
|||
Loading…
Reference in a new issue