diff --git a/docs/pubsub-usage.rst b/docs/pubsub-usage.rst index cbe8e164f605..795a64d9464b 100644 --- a/docs/pubsub-usage.rst +++ b/docs/pubsub-usage.rst @@ -8,7 +8,7 @@ Connection / Authorization - credentials (derived from GAE / GCE environ if present). - - ``project_id`` (derived from GAE / GCE environ if present). + - ``project`` (derived from GAE / GCE environ if present). - ``scopes`` @@ -29,7 +29,7 @@ Create a new topic for an explicit project: .. doctest:: >>> from gcloud.pubsub import Topic - >>> topic = Topic('topic_name', project_id='my.project') + >>> topic = Topic('topic_name', project='my.project') >>> topic.create() # API request Check for the existance of a topic: @@ -54,7 +54,7 @@ List topics for an explicit project: .. doctest:: >>> from gcloud.pubsub import list_topics - >>> topics = list_topics(project_id='my.project') # API request + >>> topics = list_topics(project='my.project') # API request >>> [topic.name for topic in topics] ['topic_name'] diff --git a/gcloud/test__helpers.py b/gcloud/test__helpers.py index a543e3245f73..21cfadd433ba 100644 --- a/gcloud/test__helpers.py +++ b/gcloud/test__helpers.py @@ -340,13 +340,13 @@ def close(self): class _HTTPConnection(_BaseHTTPConnection): - def __init__(self, status, project_id): + def __init__(self, status, project): super(_HTTPConnection, self).__init__() self.status = status - self.project_id = project_id + self.project = project def getresponse(self): - return _HTTPResponse(self.status, self.project_id) + return _HTTPResponse(self.status, self.project) class _TimeoutHTTPConnection(_BaseHTTPConnection): diff --git a/regression/pubsub.py b/regression/pubsub.py index 7c0db3cffc6e..2c86148ac4da 100644 --- a/regression/pubsub.py +++ b/regression/pubsub.py @@ -57,10 +57,10 @@ def test_list_topics(self): # Retrieve the topics. all_topics, _ = pubsub.list_topics() - project_id = pubsub.get_default_project() + project = pubsub.get_default_project() created = [topic for topic in all_topics if topic.name in topics_to_create and - topic.project == project_id] + topic.project == project] self.assertEqual(len(created), len(topics_to_create)) def test_create_subscription(self):