def test_saved_searches(self):
httpretty.register_uri(
httpretty.GET, "http://dummyhost:80/api/search/saved",
body='{"searches" : [{"query": {"query": "level:INFO", "fields":"timestamp,message"}}]}',
content_type="application/json"
)
saved_searches = self.api.get_saved_queries()
self.assertEquals("level:INFO", saved_searches['searches'][0]['query']['query'])
self.assertEquals("timestamp,message", saved_searches['searches'][0]['query']['fields'])
评论列表
文章目录