A multipurpose python flask API server and administration SPA
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
574 B

  1. from datetime import datetime
  2. from flask.testing import FlaskClient
  3. from tests.conftest import AuthActions
  4. def test_get_health_happy_path(auth: AuthActions, client: FlaskClient):
  5. with auth:
  6. auth_header = auth.get_authorization_header_token()
  7. result = client.get(
  8. '/health',
  9. headers={
  10. auth_header[0]: auth_header[1]
  11. })
  12. assert 200 == result.status_code
  13. assert result.json is not None
  14. assert result.json['message'] == 'Service is healthy'
  15. assert result.json['success']