X-Git-Url: http://git.veekun.com/zzz-pokedex.git/blobdiff_plain/282096cd8d7897d85f89767091f9d486cc6dfd39..0069207e4e6fc2c68d0f9c2eb8ad9fc818349b38:/pokedex/tests/test_lookup.py?ds=inline diff --git a/pokedex/tests/test_lookup.py b/pokedex/tests/test_lookup.py index 25c3c8a..5d9ff95 100644 --- a/pokedex/tests/test_lookup.py +++ b/pokedex/tests/test_lookup.py @@ -28,7 +28,8 @@ def test_exact_lookup(): # Forms (u'Rotom', 'pokemon', 479), - (u'Wash Rotom', 'pokemon', 504), + (u'Wash Rotom', 'pokemon_forms',10059), + (u'East Shellos', 'pokemon_forms',10039), # Other languages (u'イーブイ', 'pokemon', 133), @@ -146,3 +147,8 @@ def test_random_lookup(): assert_equal(len(results), 1, u'Constrained random returns one result') assert_equal(results[0].object.__tablename__, table_name, u'Constrained random returns result from the right table') + +def test_crash_empty_prefix(): + """Searching for ':foo' used to crash, augh!""" + results = lookup.lookup(u':Eevee') + assert_equal(results[0].object.name, u'Eevee', u'Empty prefix dun crash')