2019-02-14 12:37:47 +03:00
|
|
|
import pytest
|
|
|
|
|
2022-09-29 20:18:49 +03:00
|
|
|
def v1qCompat(hge_ctx, q):
|
2019-02-14 12:37:47 +03:00
|
|
|
h = {'X-Hasura-Access-Key': hge_ctx.hge_key}
|
|
|
|
resp = hge_ctx.http.post(
|
|
|
|
hge_ctx.hge_url + "/v1/query",
|
|
|
|
json=q,
|
|
|
|
headers=h
|
|
|
|
)
|
|
|
|
return resp.status_code, resp.json()
|
|
|
|
|
2022-09-29 20:18:49 +03:00
|
|
|
@pytest.mark.admin_secret
|
2019-02-14 12:37:47 +03:00
|
|
|
class TestGraphQLCompatAccessKey():
|
|
|
|
|
|
|
|
export_metadata = {
|
|
|
|
"type" : "export_metadata",
|
|
|
|
"args" : {}
|
|
|
|
}
|
|
|
|
|
|
|
|
def test_compact_access_key_export_metadata(self, hge_ctx):
|
|
|
|
code, resp = v1qCompat(hge_ctx, self.export_metadata)
|
|
|
|
assert code == 200, resp
|