Beispiel #1
0
def test_get_tags():
    """
    SmartAPI.get_tags()
    SmartAPI.get_tags(field)
    """
    aggs = SmartAPI.get_tags()
    assert aggs == {'Chunlei Wu': 2}
    aggs = SmartAPI.get_tags('tags.name')
    assert 'annotation' in aggs
    assert 'translator' in aggs
    assert 'biothings' in aggs
Beispiel #2
0
 def get(self):
     """
     /api/suggestion?field=
     Returns aggregations for any field provided
     Used for tag:count on registry
     """
     res = SmartAPI.get_tags(self.args.field)
     self.finish(res)