def setup(self): es = ElasticSearch() es.host = 'http://127.0.1.1:9202' es.index = 'foobar' self.es = es class MyModel(self.es.Model): __type__ = 'footype' self.Model = MyModel
def setup(self): es = ElasticSearch() es.host = 'http://127.0.1.1:9202' es.index = 'foobar' self.es = es class MyModel(self.es.Model): __type__ = 'footype' self.Model = MyModel
def setup(self): es = ElasticSearch() es.host = "http://127.0.1.1:9202" es.index = "foobar" self.es = es class MyModel(self.es.Model): __type__ = "footype" self.Model = MyModel
def test_conn(self): es = ElasticSearch() es.host = 'http://127.0.1.1:9202' es.index = 'foobar' assert_true(isinstance(es.conn, elasticsearch.Elasticsearch))
def test_auth(self): es = ElasticSearch() es.host = 'http://*****:*****@127.0.1.1:9202' es.index = 'foobar' assert_equal(('foo', 'bar'), es.conn.transport.hosts[0]['http_auth'])
def test_conn(self): es = ElasticSearch() es.host = 'http://127.0.1.1:9202' es.index = 'foobar' assert_true(isinstance(es.conn, elasticsearch.Elasticsearch))
def test_auth(self): es = ElasticSearch() es.host = 'http://*****:*****@127.0.1.1:9202' es.index = 'foobar' assert_equal(('foo', 'bar'), es.conn.transport.hosts[0]['http_auth'])
def test_auth(self): es = ElasticSearch() es.host = "http://*****:*****@127.0.1.1:9202" es.index = "foobar" assert_equal(("foo", "bar"), es.conn.transport.hosts[0]["http_auth"])