tests.py 文件源码

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

项目:mygene.info 作者: biothings 项目源码 文件源码
def test_gene_other_names(self):
        # this one has some
        res = self.json_ok(self.get_ok(self.api + "/gene/107924918"))
        assert "other_names" in res, "No other_names found in %s" % res
        eq_(res["other_names"],['aquaporin NIP1-2-like', 'aquaporin NIP1;2', 'aquaporin NIP1;3'])
        # that one not
        res = self.json_ok(self.get_ok(self.api + "/gene/1246509"))
        assert not "other_names" in res
        # query by other_names:
        res = self.json_ok(self.get_ok(self.api + "/query?q=other_names:p33&size=50"))
        assert res["total"] > 30 # currently 35...
        #eq_(len(res["hits"]),10)
        ids = [h["_id"] for h in res["hits"]]
        assert "1017" in ids, "Should have 1017 in results"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号