diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..171936b --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,23 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Current File", + "type": "debugpy", + "request": "launch", + "program": "${file}", + "console": "integratedTerminal" + }, + { + "name": "Python: Run Functional Tests (From Scratch)", + "type": "debugpy", + "request": "launch", + "program": "pytest", + "console": "integratedTerminal", + "env": { + "PYTEST_CASSETTES_DIR": "${workspaceFolder}/tests/cassettes" + }, + "preLaunchTask": "delete_cassettes" + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..98394f0 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,17 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "delete_cassettes", + "type": "shell", + "command": "rm", + "args": ["-rf", "${workspaceFolder}/tests/**/cassettes/*.yaml"], + "problemMatcher": { + "base": "$tsc-watch", + "applyTo": "allDocuments" + } + } + ] +} diff --git a/poetry.lock b/poetry.lock index 0a7af1b..87acce5 100644 --- a/poetry.lock +++ b/poetry.lock @@ -569,13 +569,13 @@ doc = ["reno", "sphinx", "tornado (>=4.5)"] [[package]] name = "urllib3" -version = "1.26.18" +version = "1.26.19" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" files = [ - {file = "urllib3-1.26.18-py2.py3-none-any.whl", hash = "sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07"}, - {file = "urllib3-1.26.18.tar.gz", hash = "sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0"}, + {file = "urllib3-1.26.19-py2.py3-none-any.whl", hash = "sha256:37a0344459b199fce0e80b0d3569837ec6b6937435c5244e7fd73fa6006830f3"}, + {file = "urllib3-1.26.19.tar.gz", hash = "sha256:3e3d753a8618b86d7de333b4223005f68720bcd6a7d2bcb9fbd2229ec7c1e429"}, ] [package.extras] diff --git a/pyproject.toml b/pyproject.toml index 0e401b1..ec66a23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "diffbot-kg" -version = "0.2.1" +version = "0.2.3" description = "Python client for the Diffbot Knowledge Graph API." authors = ["Brendan C. Smith"] license = "MIT" diff --git a/tests/unit/clients/test_enhance_client.py b/tests/unit/clients/test_enhance_client.py index 1db34c4..0097850 100644 --- a/tests/unit/clients/test_enhance_client.py +++ b/tests/unit/clients/test_enhance_client.py @@ -17,7 +17,7 @@ async def test_mocked_enhance(self, mocker, client): # ARRANGE # Define the search query parameters - params = {"query": "your_search_query", "limit": 10} + params = {"query": "your_search_query", "size": 10} # Mock the _post_or_put method mocker.patch.object( @@ -43,7 +43,7 @@ async def test_mocked_create_bulkjob(self, mocker, client): # ARRANGE # Define the search query parameters - params = {"query": "your_bulk_enhance_query", "limit": 10} + params = {"query": "your_bulk_enhance_query", "size": 10} # Mock the _post_or_put method mocker.patch.object( diff --git a/tests/unit/clients/test_search_client.py b/tests/unit/clients/test_search_client.py index aa055ae..9624a95 100644 --- a/tests/unit/clients/test_search_client.py +++ b/tests/unit/clients/test_search_client.py @@ -19,7 +19,7 @@ async def test_mocked_search(self, mocker, client): # ARRANGE # Define the search query parameters - params = {"query": "your_search_query", "limit": 10} + params = {"query": "your_search_query", "size": 10} # Mock the _post_or_put method mocker.patch.object(