/
alt3rmann
/
graphql-engine
Обзор
Документация
Войти
/
alt3rmann
/
graphql-engine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
server/tests-py/test_validation.py
25 строк
987 B
Samir Talwar
server/tests-py: Set up postgis extensions using a fixture.
15 авг 2022, 17:30
15 авг 2022, 17:30
a0176c2
Код
Авторство
О чём код?
import pytest from validate import check_query_f # @pytest.mark.parametrize("transport", ['http', 'websocket']) # graphql parser can't seem to parse {where: null}, disabling # websocket till then @pytest.mark.parametrize("transport", ['http']) @pytest.mark.usefixtures('postgis', 'per_method_tests_db_state') class TestGraphQLValidation: 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.yaml", transport) def test_variable_type_mismatch(self, hge_ctx, transport): check_query_f(hge_ctx, self.dir() + "/variable_type_mismatch.yaml", transport) def test_json_column_value(self, hge_ctx, transport): check_query_f(hge_ctx, self.dir() + "/json_column_value.yaml", transport) @classmethod def dir(cls): return "queries/graphql_validation"