Skip to content

Commit 57ef910

Browse files
authored
Using unittest.mock instead of mock (#504)
Also Running gql-cli --version test in subprocess mode to try to fix flaky test
1 parent 013eebd commit 57ef910

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"pytest-asyncio==0.21.1",
2020
"pytest-console-scripts==1.3.1",
2121
"pytest-cov==5.0.0",
22-
"mock==4.0.2",
2322
"vcrpy==4.4.0",
2423
"aiofiles",
2524
]

tests/test_cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ def test_cli_get_transport_no_protocol(parser):
370370
get_transport(args)
371371

372372

373+
@pytest.mark.script_launch_mode("subprocess")
373374
def test_cli_ep_version(script_runner):
374375
ret = script_runner.run("gql-cli", "--version")
375376

tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
from contextlib import suppress
3+
from unittest import mock
34

4-
import mock
55
import pytest
66
from graphql import build_ast_schema, parse
77

0 commit comments

Comments
 (0)