def test_get_search2(self):
with main.app.test_request_context():
# Add sample search, and attempt to get the JSON
# representing it
sid = self.add_sample_search()
sid2 = self.add_sample_search()
rv = self.app.get("/search")
d = json.loads(rv.data.decode("utf-8"))
# Make sure the search data is still good, and
# and only 1 search is returned
assert len(d['searches']) == 2
assert len(d['searches'][1]["data_searches"]) == 2
print ("test_get_search2 passed")
# Make sure that we can get the metadata about available data sources
# to enable users to easily create valid searches
评论列表
文章目录