예제 #1
0
    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)
예제 #2
0
    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)
예제 #3
0
 def setUpClass(cls):
     cls.response = requests.get(urls.item_schema_url('not-found'))
예제 #4
0
 def setUpClass(cls):
     cls.response = requests.get(urls.item_schema_url('not-found'))
예제 #5
0
 def test_location_header(self):
     location_url = urls.item_schema_url(self.schema['collectionName'])
     self.response.headers['location'].should.equal(location_url)