def test_retrieve_without_conceptauthority(self): """ If a ConceptAuthority does not exist, or is not selected, should return status code 403. """ ConceptAuthority.objects.get().delete() response = retrieve(self.request, cp_concept) self.assertEqual(response.status_code, 403)
def test_retrieve_legit_concept(self): """ If a legit concept from the ConceptAuthority is provided, then should get status 200 and some json. """ response = retrieve(self.request, cp_concept) self.assertEqual(response.status_code, 200) self.assertEqual(simplejson.loads(response.content)['uri'], cp_concept)