File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
quixstreams/platforms/quix
tests/test_quixstreams/test_platforms/test_quix Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 11
11
from quixstreams .exceptions import QuixException
12
12
from quixstreams .models .topics import Topic
13
13
from .api import QuixPortalApiService
14
+ from .exceptions import UndefinedQuixWorkspaceId
14
15
15
16
logger = logging .getLogger (__name__ )
16
17
@@ -122,7 +123,7 @@ def __init__(
122
123
123
124
try :
124
125
self ._workspace_id = workspace_id or self .api .default_workspace_id
125
- except self . api . UndefinedQuixWorkspaceId :
126
+ except UndefinedQuixWorkspaceId :
126
127
self ._workspace_id = None
127
128
logger .warning (
128
129
"No workspace ID was provided directly or found via environment; "
Original file line number Diff line number Diff line change 7
7
import pytest
8
8
from requests import HTTPError , Response
9
9
10
+ from quixstreams .platforms .quix .api import QuixPortalApiService
10
11
from quixstreams .platforms .quix .config import (
11
12
QUIX_CONNECTIONS_MAX_IDLE_MS ,
12
13
QUIX_METADATA_MAX_AGE_MS ,
13
14
)
14
15
15
16
16
17
class TestQuixKafkaConfigsBuilder :
18
+ def test_no_workspace_id_warning (self , quix_kafka_config_factory , caplog ):
19
+ quix_kafka_config_factory (api_class = QuixPortalApiService (auth_token = "12345" ))
20
+ assert "No workspace ID was provided" in caplog .text
21
+
17
22
def test_search_for_workspace_id (self , quix_kafka_config_factory ):
18
23
api_data_stub = {"workspaceId" : "myworkspace12345" , "name" : "my workspace" }
19
24
cfg_factory = quix_kafka_config_factory (
You can’t perform that action at this time.
0 commit comments