diff --git a/pyzeebe/channel/utils.py b/pyzeebe/channel/utils.py index b7df275e..fcea921d 100644 --- a/pyzeebe/channel/utils.py +++ b/pyzeebe/channel/utils.py @@ -1,9 +1,7 @@ import os from typing import Optional -DEFAULT_HOSTNAME = "localhost" -DEFAULT_PORT = 26500 -DEFAULT_ADDRESS = f"{DEFAULT_HOSTNAME}:{DEFAULT_PORT}" +DEFAULT_ZEEBE_ADDRESS = "localhost:26500" def create_address( @@ -11,4 +9,4 @@ def create_address( ) -> str: if grpc_address: return grpc_address - return os.getenv("ZEEBE_ADDRESS", DEFAULT_ADDRESS) + return os.getenv("ZEEBE_ADDRESS", DEFAULT_ZEEBE_ADDRESS) diff --git a/tests/unit/channel/insecure_channel_test.py b/tests/unit/channel/insecure_channel_test.py index 9b35622f..e76fe6ae 100644 --- a/tests/unit/channel/insecure_channel_test.py +++ b/tests/unit/channel/insecure_channel_test.py @@ -1,12 +1,11 @@ from unittest.mock import Mock, patch -from uuid import uuid4 import grpc import pytest from pyzeebe import create_insecure_channel from pyzeebe.channel.channel_options import get_channel_options -from pyzeebe.channel.utils import DEFAULT_HOSTNAME, DEFAULT_PORT, create_address +from pyzeebe.channel.utils import create_address class TestCreateInsecureChannel: diff --git a/tests/unit/channel/secure_channel_test.py b/tests/unit/channel/secure_channel_test.py index 245161cd..181f5f80 100644 --- a/tests/unit/channel/secure_channel_test.py +++ b/tests/unit/channel/secure_channel_test.py @@ -1,12 +1,11 @@ from unittest.mock import Mock, patch -from uuid import uuid4 import grpc import pytest from pyzeebe import create_secure_channel from pyzeebe.channel.channel_options import get_channel_options -from pyzeebe.channel.utils import DEFAULT_HOSTNAME, DEFAULT_PORT, create_address +from pyzeebe.channel.utils import create_address class TestCreateSecureChannel: diff --git a/tests/unit/channel/utils_test.py b/tests/unit/channel/utils_test.py index cb73e3a4..f4d0a9ef 100644 --- a/tests/unit/channel/utils_test.py +++ b/tests/unit/channel/utils_test.py @@ -1,7 +1,7 @@ import os from uuid import uuid4 -from pyzeebe.channel.utils import DEFAULT_ADDRESS, create_address +from pyzeebe.channel.utils import DEFAULT_ZEEBE_ADDRESS, create_address class TestCreateAddress: @@ -14,7 +14,7 @@ def test_returns_passed_address(self): def test_returns_default_address(self): address = create_address() - assert address == DEFAULT_ADDRESS + assert address == DEFAULT_ZEEBE_ADDRESS def test_returns_env_var_if_provided(self): zeebe_address = str(uuid4())