From 7090972280820e14772cca74fdc3e067bf89e7b1 Mon Sep 17 00:00:00 2001 From: Leszek Hanusz Date: Mon, 28 Oct 2024 13:04:52 +0100 Subject: [PATCH 1/3] Using unittest.mock instead of mock --- setup.py | 1 - tests/test_client.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 054bc93e..21763a03 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,6 @@ "pytest-asyncio==0.21.1", "pytest-console-scripts==1.3.1", "pytest-cov==5.0.0", - "mock==4.0.2", "vcrpy==4.4.0", "aiofiles", ] diff --git a/tests/test_client.py b/tests/test_client.py index ada129c6..f7a3c947 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1,7 +1,7 @@ import os from contextlib import suppress +from unittest import mock -import mock import pytest from graphql import build_ast_schema, parse From 7b84d6f54bba2690dd6c4c0194d295231decfcb8 Mon Sep 17 00:00:00 2001 From: Leszek Hanusz Date: Mon, 28 Oct 2024 21:47:48 +0100 Subject: [PATCH 2/3] Running gql-cli --version test in subprocess mode --- tests/test_cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_cli.py b/tests/test_cli.py index f0534957..84e66a1b 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -370,6 +370,7 @@ def test_cli_get_transport_no_protocol(parser): get_transport(args) +@pytest.mark.script_launch_mode('subprocess') def test_cli_ep_version(script_runner): ret = script_runner.run("gql-cli", "--version") From 942cc525298ede59662f9c5e2d8e9a50a9d8fe04 Mon Sep 17 00:00:00 2001 From: Leszek Hanusz Date: Mon, 28 Oct 2024 21:53:29 +0100 Subject: [PATCH 3/3] Run make test --- tests/test_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 84e66a1b..cdbe07f9 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -370,7 +370,7 @@ def test_cli_get_transport_no_protocol(parser): get_transport(args) -@pytest.mark.script_launch_mode('subprocess') +@pytest.mark.script_launch_mode("subprocess") def test_cli_ep_version(script_runner): ret = script_runner.run("gql-cli", "--version")