Commit 5c12b030 by Oleg Marshev

Fix docstr.

parent 7a5c5919
...@@ -152,14 +152,16 @@ class AnnotationViewTests(BaseAnnotationViewTests): ...@@ -152,14 +152,16 @@ class AnnotationViewTests(BaseAnnotationViewTests):
def test_delete_es_disabled(self): def test_delete_es_disabled(self):
""" """
Ensure we can create note in database when elasticsearch is disabled. Ensure we can delete note in database when elasticsearch is disabled.
""" """
url = reverse('api:v1:annotations') url = reverse('api:v1:annotations')
response = self.client.post(url, self.payload, format='json') response = self.client.post(url, self.payload, format='json')
get_es().indices.refresh() get_es().indices.refresh()
self.assertEqual(note_searcher.filter(id=response.data['id']).count(), 1) self.assertEqual(note_searcher.filter(id=response.data['id']).count(), 1)
with patch('django.conf.settings.ES_DISABLED', True): with patch('django.conf.settings.ES_DISABLED', True):
Note.objects.get(id=response.data['id']).delete() Note.objects.get(id=response.data['id']).delete()
self.assertEqual(note_searcher.filter(id=response.data['id']).count(), 1) self.assertEqual(note_searcher.filter(id=response.data['id']).count(), 1)
def test_create_ignore_created(self): def test_create_ignore_created(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment