def test_create_subscription_with_ordering(subscriber_client, capsys): subscriber.create_subscription_with_ordering(PROJECT, TOPIC, SUBSCRIPTION_ORDERING) out, _ = capsys.readouterr() assert "Created subscription with ordering" in out assert "enable_message_ordering: true" in out subscription_path = subscriber_client.subscription_path(PROJECT, SUBSCRIPTION_ORDERING) subscriber_client.delete_subscription(subscription_path)
def test_create_subscription_with_ordering(subscriber_client, subscription_admin, capsys): subscription_path = subscriber_client.subscription_path( PROJECT_ID, SUBSCRIPTION_ADMIN) try: subscriber_client.delete_subscription( request={"subscription": subscription_path}) except NotFound: pass subscriber.create_subscription_with_ordering(PROJECT_ID, TOPIC, SUBSCRIPTION_ADMIN) out, _ = capsys.readouterr() assert "Created subscription with ordering" in out assert f"{subscription_admin}" in out assert "enable_message_ordering: true" in out