Mercurial > hg > GlobalNeighbors
diff tests/test_web.py @ 13:94af113e498a
we have links
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 25 Jun 2017 14:04:49 -0700 |
parents | 1b94f3bf97e5 |
children |
line wrap: on
line diff
--- a/tests/test_web.py Sun Jun 25 13:18:13 2017 -0700 +++ b/tests/test_web.py Sun Jun 25 14:04:49 2017 -0700 @@ -24,10 +24,12 @@ # Let's look for Chicago q = u'Ch' results = autocomplete(cities, q) - assert all([result.startswith(q) - for result in results]) - assert sorted(results) == results - assert 'Chicago' in results + names = [result['name'] + for result in results] + assert all([name.startswith(q) + for name in names]) + assert sorted(names) == names + assert 'Chicago' in names if __name__ == '__main__':