File: test_indices.py

package info (click to toggle)
python-elasticsearch 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 588 kB
  • ctags: 665
  • sloc: python: 2,748; makefile: 155
file content (14 lines) | stat: -rw-r--r-- 623 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from test_elasticsearch.test_cases import ElasticsearchTestCase

class TestIndices(ElasticsearchTestCase):
    def test_create_one_index(self):
        self.client.indices.create('test-index')
        self.assert_url_called('PUT', '/test-index')

    def test_delete_multiple_indices(self):
        self.client.indices.delete(['test-index', 'second.index', 'third/index'])
        self.assert_url_called('DELETE', '/test-index,second.index,third%2Findex')

    def test_exists_index(self):
        self.client.indices.exists('second.index,third/index')
        self.assert_url_called('HEAD', '/second.index,third%2Findex')