Skip to content

Commit

Permalink
Remove now-redundant testcase.
Browse files Browse the repository at this point in the history
Rename several testcases to make their intent clearer in the NWO.
  • Loading branch information
tseaver committed Jan 8, 2015
1 parent f577b30 commit 0e22a7b
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions gcloud/datastore/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,7 @@ def _callFUT(self, val):
from gcloud.datastore.helpers import entity_from_protobuf
return entity_from_protobuf(val)

def test_wo_dataset_id(self):
from gcloud.datastore import datastore_v1_pb2 as datastore_pb

_DATASET_ID = 'DATASET'
_KIND = 'KIND'
_ID = 1234
entity_pb = datastore_pb.Entity()
entity_pb.key.partition_id.dataset_id = _DATASET_ID
entity_pb.key.path_element.add(kind=_KIND, id=_ID)
prop_pb = entity_pb.property.add()
prop_pb.name = 'foo'
prop_pb.value.string_value = 'Foo'
entity = self._callFUT(entity_pb)
self.assertEqual(entity.kind, _KIND)
self.assertEqual(entity['foo'], 'Foo')
key = entity.key
self.assertEqual(key.dataset_id, _DATASET_ID)
self.assertEqual(key.namespace, None)
self.assertEqual(key.kind, _KIND)
self.assertEqual(key.id, _ID)

def test_w_dataset_id(self):
def test_it(self):
from gcloud.datastore import datastore_v1_pb2 as datastore_pb

_DATASET_ID = 'DATASET'
Expand Down Expand Up @@ -96,7 +75,7 @@ def _makePB(self, dataset_id=None, namespace=None, path=()):
added.name = elem['name']
return pb

def test_w_dataset_id_in_pb(self):
def test_wo_namespace_in_pb(self):
_DATASET = 'DATASET'
pb = self._makePB(path=[{'kind': 'KIND'}], dataset_id=_DATASET)
key = self._callFUT(pb)
Expand All @@ -112,7 +91,7 @@ def test_w_namespace_in_pb(self):
self.assertEqual(key.dataset_id, _DATASET)
self.assertEqual(key.namespace, _NAMESPACE)

def test_w_path_in_pb(self):
def test_w_nested_path_in_pb(self):
_PATH = [
{'kind': 'PARENT', 'name': 'NAME'},
{'kind': 'CHILD', 'id': 1234},
Expand Down

0 comments on commit 0e22a7b

Please sign in to comment.