Skip to content

Commit

Permalink
apps.administrator.tests.restful: Test search with all result_fieldgr…
Browse files Browse the repository at this point in the history
…oups in AssignmentGroup.
  • Loading branch information
espenak committed Jul 25, 2011
1 parent 2e1accf commit ed469f9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions devilry/apps/administrator/tests/restful.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,19 @@ def test_search(self):
first = data['items'][0]
self.assertEquals(set(first.keys()), set(self.resultfields.aslist()))


def test_search_all_result_fieldgroups(self):
url = self.simplifiedcls.get_rest_url()
allExtraFieldgroups = SimplifiedAssignmentGroup._meta.resultfields.additional_aslist()
r = self.client.get(url, data={'getdata_in_qrystring': True,
'result_fieldgroups': json.dumps(allExtraFieldgroups)})
self.assertEquals(r.status_code, 200)
data = json.loads(r.content)
first = data['items'][0]
self.assertEquals(set(first.keys()), set(self.resultfields.all_aslist()))



def test_create(self):
#TODO test_create
pass
Expand Down

0 comments on commit ed469f9

Please sign in to comment.