def test_advance_status_wrong_body(self): new_state = 'stable' response = test_insert_anotation(self) anno_uri = extract_annotation_uri(response.content) annoid = anno_uri[anno_uri.rfind('/') + 1 : ] self.assertIsNotNone(annoid, "Did not insert the annotation") data = {'annotation': annoid, 'toState': new_state} response = advance_status(test_advance_status(self, url='/advance_status?' + urlencode(data), data=json.dumps(data)))
def test_advance_status(self): new_state = 'stable' response = test_insert_anotation(self) anno_uri = extract_annotation_uri(response.content) annoid = anno_uri[anno_uri.rfind('/') + 1 : ] self.assertIsNotNone(annoid, "Did not insert the annotation") data = {'annotation': annoid, 'toState': new_state} response = advance_status(test_advance_status(self, json.dumps(data))) ''' Need to verify better the triple has been moved for example using the (TBD) ''' self.assert_(response.status_code == 200, "HTTPResponse has status_code: %s" % response.status_code)