diff --git a/it/config.json b/it/config.json index 43d7324e87..67c04f219d 100644 --- a/it/config.json +++ b/it/config.json @@ -53,6 +53,9 @@ } ] }, + "./tests/Kiota.Builder.IntegrationTests/ToDoApi.yaml": { + "MockServerITFolder": "todo" + }, "./tests/Kiota.Builder.IntegrationTests/InheritingErrors.yaml": { "MockServerITFolder": "basic", "Suppressions": [ diff --git a/it/python/pyproject.toml b/it/python/pyproject.toml index dbc6bcf7e5..8aef42b97f 100644 --- a/it/python/pyproject.toml +++ b/it/python/pyproject.toml @@ -4,16 +4,15 @@ build-backend = "flit_core.buildapi" [project] name = "integration-test" -authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] +authors = [{ name = "Microsoft", email = "graphtooling+python@microsoft.com" }] dependencies = [ - "uritemplate >=4.1.1", - "microsoft-kiota-abstractions >= 0.6.0", - "microsoft-kiota-http >= 0.4.4", - "microsoft-kiota-authentication-azure >= 0.2.0", - "microsoft-kiota-serialization-json >= 0.3.7", - "microsoft-kiota-serialization-text >= 0.2.1" + "microsoft-kiota-abstractions >= 1.0.0", + "microsoft-kiota-http >= 1.2.0", + "microsoft-kiota-authentication-azure >= 1.0.0", + "microsoft-kiota-serialization-json >= 1.0.0", + "microsoft-kiota-serialization-text >= 1.0.0", ] -license = {file = "LICENSE"} +license = { file = "LICENSE" } readme = "README.md" keywords = ["kiota"] classifiers = [ @@ -44,4 +43,4 @@ each_dict_entry_on_separate_line = true column_limit = 100 [tool.isort] -profile = "hug" \ No newline at end of file +profile = "hug" diff --git a/it/python/todo/test_sample.py b/it/python/todo/test_sample.py new file mode 100644 index 0000000000..eca7153cb1 --- /dev/null +++ b/it/python/todo/test_sample.py @@ -0,0 +1,25 @@ +import pytest +from kiota_abstractions.headers_collection import HeadersCollection +from kiota_abstractions.authentication.anonymous_authentication_provider import ( + AnonymousAuthenticationProvider, +) +from kiota_http.httpx_request_adapter import HttpxRequestAdapter + +from client.api_client import ApiClient +from client.models.new_todo import NewTodo +from client.todos.todos_request_builder import TodosRequestBuilder + +@pytest.mark.asyncio +async def test_basic_upload_download(): + auth_provider = AnonymousAuthenticationProvider() + request_adapter = HttpxRequestAdapter(auth_provider) + request_adapter.base_url = 'http://127.0.0.1:1080' + client = ApiClient(request_adapter) + + myHeaders = HeadersCollection() + myHeaders.add("My-Extra-Header", "hello") + config = TodosRequestBuilder.TodosRequestBuilderPostRequestConfiguration( + headers = myHeaders + ) + + await client.todos.post(NewTodo(), config)