Skip to content

Commit 87273a1

Browse files
committed
Merge pull request #497 from tseaver/quick-cleanups-20140107
Quick cleanups 20140107
2 parents 8faba35 + 5571485 commit 87273a1

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

gcloud/datastore/__init__.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616
1717
You'll typically use these to get started with the API:
1818
19-
>>> from gcloud import datastore
20-
>>> dataset = datastore.get_dataset('dataset-id-here')
21-
>>> # Then do other things...
22-
>>> query = dataset.query().kind('EntityKind')
23-
>>> entity = dataset.entity('EntityKind')
19+
>>> from gcloud.datastore.entity import Entity
20+
>>> from gcloud.datastore.key import Key
21+
>>> from gcloud.datastore.query import Query
22+
>>> key = Key('EntityKind', 1234)
23+
>>> entity = Entity(key)
24+
>>> query = Query('your-dataset-id', kind='EntityKind')
2425
2526
The main concepts with this API are:
2627

gcloud/datastore/test___init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ class Test_set_default_dataset(unittest2.TestCase):
4040
def setUp(self):
4141
from gcloud.datastore import _implicit_environ
4242
self._replaced_dataset = _implicit_environ.DATASET
43-
_implicit_environ.DATASET = None
43+
self._replaced_dataset_id = _implicit_environ.DATASET_ID
44+
_implicit_environ.DATASET = _implicit_environ.DATASET_ID = None
4445

4546
def tearDown(self):
4647
from gcloud.datastore import _implicit_environ
4748
_implicit_environ.DATASET = self._replaced_dataset
49+
_implicit_environ.DATASET_ID = self._replaced_dataset_id
4850

4951
def _callFUT(self, dataset_id=None):
5052
from gcloud.datastore import set_default_dataset

0 commit comments

Comments
 (0)