diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d106f322..f8341094 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a8d4865..47513665 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - Changed generated client's methods to pass `**kwargs` to base client's `execute` and `execute_ws` methods (breaking change for custom base clients). - Added `operation_definition` argument to `generate_client_method` plugin hook. - Added `ExtractOperationsPlugin` that extracts operation strings from client methods to separate module. +- Added Python 3.12 to tested versions. ## 0.9.0 (2023-09-11) diff --git a/pyproject.toml b/pyproject.toml index d603006b..2dfb16f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Software Development :: Libraries :: Python Modules", ] dependencies = [ diff --git a/tests/main/test_main.py b/tests/main/test_main.py index f26553d2..1a3d2635 100644 --- a/tests/main/test_main.py +++ b/tests/main/test_main.py @@ -255,9 +255,11 @@ def test_main_uses_remote_schema_url_and_remote_schema_headers( package_path = project_dir / package_name assert package_path.is_dir() assert_the_same_files_in_directories(package_path, expected_package_path) - assert mocked_post.called_with( - url="http://test/graphql/", headers={"header1": "value1", "header2": "value2"} - ) + assert "http://test/graphql/" in mocked_post.call_args.args + assert mocked_post.call_args.kwargs["headers"] == { + "header1": "value1", + "header2": "value2", + } def test_main_can_read_config_from_provided_file(tmp_path): diff --git a/tests/test_schema.py b/tests/test_schema.py index 747ed957..42873867 100644 --- a/tests/test_schema.py +++ b/tests/test_schema.py @@ -373,7 +373,7 @@ def test_introspect_remote_schema_uses_provided_headers(mocker): introspect_remote_schema("http://testserver/graphql/", headers={"test": "value"}) assert mocked_post.called - assert mocked_post.called_with(headers={"test": "value"}) + assert mocked_post.call_args.kwargs["headers"] == {"test": "value"} @pytest.mark.parametrize("verify_ssl", [True, False]) @@ -388,7 +388,7 @@ def test_introspect_remote_schema_uses_provided_verify_ssl_flag(verify_ssl, mock introspect_remote_schema("http://testserver/graphql/", verify_ssl=verify_ssl) assert mocked_post.called - assert mocked_post.called_with(verify=verify_ssl) + assert mocked_post.call_args.kwargs["verify"] == verify_ssl def test_get_graphql_queries_returns_schema_definitions_from_single_file(