Skip to content

Commit

Permalink
Merge pull request #497 from tseaver/quick-cleanups-20140107
Browse files Browse the repository at this point in the history
Quick cleanups 20140107
  • Loading branch information
dhermes committed Jan 7, 2015
2 parents 8faba35 + 5571485 commit 87273a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 6 additions & 5 deletions gcloud/datastore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
You'll typically use these to get started with the API:
>>> from gcloud import datastore
>>> dataset = datastore.get_dataset('dataset-id-here')
>>> # Then do other things...
>>> query = dataset.query().kind('EntityKind')
>>> entity = dataset.entity('EntityKind')
>>> from gcloud.datastore.entity import Entity
>>> from gcloud.datastore.key import Key
>>> from gcloud.datastore.query import Query
>>> key = Key('EntityKind', 1234)
>>> entity = Entity(key)
>>> query = Query('your-dataset-id', kind='EntityKind')
The main concepts with this API are:
Expand Down
4 changes: 3 additions & 1 deletion gcloud/datastore/test___init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ class Test_set_default_dataset(unittest2.TestCase):
def setUp(self):
from gcloud.datastore import _implicit_environ
self._replaced_dataset = _implicit_environ.DATASET
_implicit_environ.DATASET = None
self._replaced_dataset_id = _implicit_environ.DATASET_ID
_implicit_environ.DATASET = _implicit_environ.DATASET_ID = None

def tearDown(self):
from gcloud.datastore import _implicit_environ
_implicit_environ.DATASET = self._replaced_dataset
_implicit_environ.DATASET_ID = self._replaced_dataset_id

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

0 comments on commit 87273a1

Please sign in to comment.