mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 04:24:35 +03:00
9faadec005
pytest is now at version 5.3
20 lines
769 B
Python
20 lines
769 B
Python
import pytest
|
|
from validate import check_query_f
|
|
from super_classes import DefaultTestSelectQueries
|
|
from context import PytestConf
|
|
|
|
if not PytestConf.config.getoption("--test-webhook-insecure"):
|
|
pytest.skip("--test-webhook-https-insecure flag is missing, skipping tests", allow_module_level=True)
|
|
|
|
class TestHTTPSWebhookInsecure(DefaultTestSelectQueries):
|
|
|
|
def test_user_select_unpublished_articles_err(self, hge_ctx):
|
|
check_query_f(hge_ctx, self.dir() + '/user_select_query_unpublished_articles_fail.yaml')
|
|
|
|
def test_user_only_other_users_published_articles_err(self, hge_ctx):
|
|
check_query_f(hge_ctx, self.dir() + '/user_query_other_users_published_articles_fail.yaml')
|
|
|
|
@classmethod
|
|
def dir(cls):
|
|
return 'webhook/insecure'
|