Skip to content

Commit

Permalink
fixup! replace response mock with pytest-httpx (mock)
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonvt committed Feb 6, 2025
1 parent bea8b5b commit 622ca10
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,14 @@ def random_gamma_dist_integer(inclusive_max, max_tries=100):

@contextmanager
def set_max_workers(cognite_client, new):
old = cognite_client._config.max_workers
cognite_client._config.max_workers = new
yield
cognite_client._config.max_workers = old
from cognite.client import global_config

old = global_config.max_workers
global_config.max_workers = new
try:
yield
finally:
global_config.max_workers = old


@contextmanager
Expand Down

0 comments on commit 622ca10

Please sign in to comment.