Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kill off 'DEFAULT_TOPIC_NAME'. #2195

Merged
merged 1 commit into from
Aug 25, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions system_tests/pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
from system_test_utils import unique_resource_id


DEFAULT_TOPIC_NAME = 'subscribe-me' + unique_resource_id('-')


class Config(object):
"""Run-time configuration to be modified at set-up.

Expand Down Expand Up @@ -94,7 +91,8 @@ def _all_created(result):
self.assertEqual(len(created), len(topics_to_create))

def test_create_subscription_defaults(self):
topic = Config.CLIENT.topic(DEFAULT_TOPIC_NAME)
TOPIC_NAME = 'create-sub-def' + unique_resource_id('-')
topic = Config.CLIENT.topic(TOPIC_NAME)
self.assertFalse(topic.exists())
topic.create()
self.to_delete.append(topic)
Expand All @@ -108,7 +106,8 @@ def test_create_subscription_defaults(self):
self.assertTrue(subscription.topic is topic)

def test_create_subscription_w_ack_deadline(self):
topic = Config.CLIENT.topic(DEFAULT_TOPIC_NAME)
TOPIC_NAME = 'create-sub-ack' + unique_resource_id('-')
topic = Config.CLIENT.topic(TOPIC_NAME)
self.assertFalse(topic.exists())
topic.create()
self.to_delete.append(topic)
Expand All @@ -123,7 +122,8 @@ def test_create_subscription_w_ack_deadline(self):
self.assertTrue(subscription.topic is topic)

def test_list_subscriptions(self):
topic = Config.CLIENT.topic(DEFAULT_TOPIC_NAME)
TOPIC_NAME = 'list-sub' + unique_resource_id('-')
topic = Config.CLIENT.topic(TOPIC_NAME)
self.assertFalse(topic.exists())
topic.create()
self.to_delete.append(topic)
Expand Down Expand Up @@ -152,7 +152,8 @@ def _all_created(result):

def test_message_pull_mode_e2e(self):
import operator
topic = Config.CLIENT.topic(DEFAULT_TOPIC_NAME,
TOPIC_NAME = 'message-e2e' + unique_resource_id('-')
topic = Config.CLIENT.topic(TOPIC_NAME,
timestamp_messages=True)
self.assertFalse(topic.exists())
topic.create()
Expand Down