def setUpClass(cls): data = { '$schema': 'http://json-schema.org/draft-03/hyper-schema#', 'collectionName': urls.TEST_COLLECTION_NAME } requests.post(urls.ITEM_SCHEMAS_URL, data=json.dumps(data), headers={'content-type': 'application/json'}) url = urls.item_schema_url(urls.TEST_COLLECTION_NAME) cls.response = requests.delete(url) cls.get_response = requests.get(url)
def setUpClass(cls): data = { '$schema': 'http://json-schema.org/draft-03/hyper-schema#', 'collectionName': urls.TEST_COLLECTION_NAME } requests.post( urls.ITEM_SCHEMAS_URL, data=json.dumps(data), headers={ 'content-type': 'application/json' }) url = urls.item_schema_url(urls.TEST_COLLECTION_NAME) cls.response = requests.delete(url) cls.get_response = requests.get(url)
def setUpClass(cls): cls.response = requests.get(urls.item_schema_url('not-found'))
def test_location_header(self): location_url = urls.item_schema_url(self.schema['collectionName']) self.response.headers['location'].should.equal(location_url)