Skip to content
Prev Previous commit
Next Next commit
fix cog test
  • Loading branch information
xiazhvera committed Jan 2, 2025
commit 9e33abaa4729ea0d32bf487c1a9539e434299c37
8 changes: 4 additions & 4 deletions test/test_mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def test_websockets_default(self):
region=config.region,
credentials_provider=cred_provider,
endpoint=config.endpoint,
client_id=create_client_id(),
client_id='test-test-websockets-default-{0}'.format(uuid.uuid4()),
client_bootstrap=bootstrap)
self._test_connection(connection)

Expand All @@ -156,7 +156,7 @@ def test_websockets_sts(self):
region=config.region,
credentials_provider=cred_provider,
endpoint=config.endpoint,
client_id=create_client_id(),
client_id='test-test-websockets-sts-{0}'.format(uuid.uuid4()),
client_bootstrap=bootstrap)
self._test_connection(connection)

Expand All @@ -167,15 +167,15 @@ def test_websockets_cognito(self):
resolver = DefaultHostResolver(elg)
bootstrap = ClientBootstrap(elg, resolver)
cognito_endpoint = f"cognito-identity.{config.region}.amazonaws.com"
credentials_provider = AwsCredentialsProvider.new_cognito(
cred_provider = AwsCredentialsProvider.new_cognito(
endpoint=cognito_endpoint,
identity=config.cognito_id,
tls_ctx=ClientTlsContext(TlsContextOptions()))
connection = mqtt_connection_builder.websockets_with_default_aws_signing(
region=config.region,
credentials_provider=cred_provider,
endpoint=config.endpoint,
client_id=create_client_id(),
client_id='test-websockets-cognito-{0}'.format(uuid.uuid4()),
client_bootstrap=bootstrap)
self._test_connection(connection)

Expand Down
2 changes: 1 addition & 1 deletion test/test_mqtt5.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def get():


def create_client_id():
return 'aws-iot-device-sdk-python-v2-unit-test-{0}'.format(uuid.uuid4())
return 'test-aws-iot-device-sdk-python-v2-unit-test-{0}'.format(uuid.uuid4())

class Mqtt5TestCallbacks():
def __init__(self):
Expand Down
2 changes: 1 addition & 1 deletion test/test_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get():


def create_client_id():
return 'aws-crt-python-unit-test-{0}'.format(uuid.uuid4())
return 'test-aws-iot-device-sdk-python-v2-unit-test-{0}'.format(uuid.uuid4())


class SamplesTest(unittest.TestCase):
Expand Down
Loading