Fix entity search API to not IndexError
This commit is contained in:
parent
a3c540efcb
commit
3fd92aef35
2 changed files with 16 additions and 1 deletions
|
@ -776,6 +776,21 @@ class TestConductSearch(ApiTestCase):
|
|||
|
||||
|
||||
class TestGetMatchingEntities(ApiTestCase):
|
||||
def test_simple_lookup(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
json = self.getJsonResponse(EntitySearch,
|
||||
params=dict(prefix=ADMIN_ACCESS_USER, namespace=ORGANIZATION,
|
||||
includeTeams='true'))
|
||||
self.assertEquals(1, len(json['results']))
|
||||
|
||||
def test_simple_lookup_noorg(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
json = self.getJsonResponse(EntitySearch,
|
||||
params=dict(prefix=ADMIN_ACCESS_USER))
|
||||
self.assertEquals(1, len(json['results']))
|
||||
|
||||
def test_unicode_search(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
|
|
Reference in a new issue