Skip to content

Commit

Permalink
fix failing doctest for workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonvt committed Nov 16, 2023
1 parent dbaff30 commit f7559d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cognite/client/_api/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ def trigger(
Trigger a workflow execution using a specific set of client credentials (i.e. not your current credentials):
>>> import os
>>> from cognite.client.data_classes import ClientCredentials
>>> credentials = ClientCredentials("my-client-id", os.environ["MY_CLIENT_SECRET"]),
>>> credentials = ClientCredentials("my-client-id", os.environ["MY_CLIENT_SECRET"])
>>> res = c.workflows.executions.trigger("foo", "1", client_credentials=credentials)
"""
self._warning.warn()
Expand Down
2 changes: 2 additions & 0 deletions tests/tests_unit/test_docstring_examples.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import doctest
from collections import defaultdict
from unittest import TextTestRunner
from unittest.mock import patch

Expand Down Expand Up @@ -39,6 +40,7 @@ def run_docstring_tests(module):


@patch("cognite.client.CogniteClient", CogniteClientMock)
@patch("os.environ", defaultdict(lambda: "value"))
class TestDocstringExamples:
def test_time_series(self):
run_docstring_tests(time_series)
Expand Down

0 comments on commit f7559d7

Please sign in to comment.