Пример #1
0
 def test_get_entity_kind(self):
   db_batch = flexmock()
   db_batch.should_receive('valid_data_version').and_return(True)
   dd = DatastoreDistributed(db_batch, None)
   item = Item(name="Bob", _app="hello")
   key = db.model_to_protobuf(item)
   self.assertEquals(dd.get_entity_kind(key), "Item")
Пример #2
0
 def test_get_entity_kind(self):
   db_batch = flexmock()
   db_batch.should_receive('valid_data_version').and_return(True)
   dd = DatastoreDistributed(db_batch, None)
   item = Item(name="Bob", _app="hello")
   key = db.model_to_protobuf(item)
   self.assertEquals(dd.get_entity_kind(key), "Item")
Пример #3
0
 def test_get_entity_kind(self):
   dd = DatastoreDistributed(None)
   item = Item(name="Bob", _app="hello")
   key = db.model_to_protobuf(item)
   assert dd.get_entity_kind(key) =="Item"
Пример #4
0
 def test_get_entity_kind(self):
     dd = DatastoreDistributed(None, None)
     item = Item(name="Bob", _app="hello")
     key = db.model_to_protobuf(item)
     self.assertEquals(dd.get_entity_kind(key), "Item")