tests.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:ChiCarto 作者: eeevanbbb 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号