mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-21 14:31:55 +03:00
23 lines
640 B
Python
23 lines
640 B
Python
import requests
|
|
import pytest
|
|
from context import PytestConf
|
|
|
|
if not PytestConf.config.getoption("--test-jwk-url"):
|
|
pytest.skip("--test-jwk-url flag is missing, skipping tests", allow_module_level=True)
|
|
|
|
# assumes the JWK server is running on 127.0.0.1:5001
|
|
|
|
def test_cache_control_header(hge_ctx):
|
|
print(hge_ctx)
|
|
resp = requests.get('http://localhost:5001/state')
|
|
state = resp.json()
|
|
print(state)
|
|
assert(state['cache-control'] > 0)
|
|
|
|
def test_expires_header(hge_ctx):
|
|
print(hge_ctx)
|
|
resp = requests.get('http://localhost:5001/state')
|
|
state = resp.json()
|
|
print(state)
|
|
assert(state['expires'] > 0)
|