Advertisement
hakegawa

Untitled

Jun 22nd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import unittest
  2.  
  3. import json
  4.  
  5. from jsonschema import validate
  6. from jsonschema import Draft4Validator
  7.  
  8. from ApiClient import ApiClient
  9.  
  10.  
  11. class ApiTesting(unittest.TestCase):
  12. api = ApiClient()
  13.  
  14. def test_test(self):
  15. response = self.api.get('topics/ids/')
  16. result = response['result']
  17.  
  18. test = []
  19.  
  20. for i in result:
  21.  
  22. schema = {
  23. 'type': 'number'
  24. }
  25.  
  26. Draft4Validator(schema).validate(i)
  27.  
  28. test += str(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement