2019-04-24 10:49:39 +03:00
|
|
|
import pytest
|
|
|
|
from validate import check_query_f
|
|
|
|
|
2019-05-10 09:05:11 +03:00
|
|
|
# @pytest.mark.parametrize("transport", ['http', 'websocket'])
|
2019-04-24 10:49:39 +03:00
|
|
|
# graphql parser can't seem to parse {where: null}, disabling
|
|
|
|
# websocket till then
|
|
|
|
@pytest.mark.parametrize("transport", ['http'])
|
2020-02-13 12:14:02 +03:00
|
|
|
@pytest.mark.usefixtures('per_method_tests_db_state')
|
|
|
|
class TestGraphQLValidation:
|
2019-04-24 10:49:39 +03:00
|
|
|
|
|
|
|
def test_null_value(self, hge_ctx, transport):
|
|
|
|
check_query_f(hge_ctx, self.dir() + "/null_value_err.yaml", transport)
|
|
|
|
|
|
|
|
def test_null_variable_value(self, hge_ctx, transport):
|
|
|
|
check_query_f(hge_ctx, self.dir() + "/null_variable_value_err.yaml", transport)
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def dir(cls):
|
|
|
|
return "queries/graphql_validation"
|