test.py 425 B

123456789101112131415161718192021222324252627
  1. """
  2. Test application for api request. Change authorization if necessary
  3. """
  4. import requests
  5. URL = 'http://localhost:5000/api/request/listed/country'
  6. HEADERS = {
  7. 'Authorization': 'ZDoJMSKBKz0TNhfOcCRiraCxb0UHqnbVPIQkP6yJkTdSkvysxnyQgu0U5oQ0NBa9'
  8. }
  9. DATA = {
  10. 'test': 'true',
  11. }
  12. PARAMS = {
  13. 'alt': True
  14. }
  15. RESULT = requests.post(
  16. URL,
  17. headers=HEADERS,
  18. data=DATA,
  19. params=PARAMS
  20. )
  21. print(RESULT.text)