Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- СХЕМА (SchemaRubricators.json)
- {
- "type":"array",
- "properties":{
- "alias":{
- "type":"string"
- },
- "description":{
- "type":"string"
- },
- "id":{
- "type":"number"
- }
- }
- }
- class ApiTesting(unittest.TestCase):
- api = ApiClient()
- def validate_schema(self, schema, result):
- with open(schema) as data_file:
- schema = json.load(data_file)
- Draft4Validator(schema).validate(result)
- def test_get_rubricators_list(self):
- result = self.api.get('rubricators')['result']
- self.validate_schema('SchemaRubricators.json', result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement