Adding tests for indexing strings via bulk helpers

This commit is contained in:
Honza Král
2015-10-11 05:00:14 +02:00
parent 1378073e2d
commit 9d415fadef
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -36,3 +36,7 @@ class TestChunkActions(TestCase):
def test_chunks_are_chopped_by_chunk_size(self): def test_chunks_are_chopped_by_chunk_size(self):
self.assertEquals(10, len(list(helpers._chunk_actions(self.actions, 10, 99999999, JSONSerializer())))) self.assertEquals(10, len(list(helpers._chunk_actions(self.actions, 10, 99999999, JSONSerializer()))))
class TestExpandActions(TestCase):
def test_string_actions_are_marked_as_simple_inserts(self):
self.assertEquals(('{"index":{}}', "whatever"), helpers.expand_action('whatever'))