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"
评论列表
文章目录