fixture.loadable.google_datastore_loadable
Components for loading and unloading data using the Google App Engine Datastore.
Added in version 1.1
-
class fixture.loadable.google_datastore_loadable.GoogleDatastoreFixture(env=None, **kw)
Bases: fixture.loadable.loadable.EnvLoadableFixture
A fixture that knows how to load DataSet objects into Google Datastore Entity objects.
>>> from fixture import GoogleDatastoreFixture
See Using Fixture With Google App Engine for a complete example.
Keyword Arguments:
- style
- A Style object to translate names with
- env
- A dict or module that contains Entity classes. This will be searched when
Style translates DataSet names into
storage media. See EnvLoadableFixture.attach_storage_medium for details on
how env works.
- dataclass
- SuperSet class to represent loaded data with
- medium
- A custom StorageMediumAdapter
class to instantiate when storing a DataSet.
By default, an Entity adapter will be used so you should only set a custom medium
if you know what you doing.
Added in version 1.1
-
class fixture.loadable.google_datastore_loadable.EntityMedium(medium, dataset)
Bases: fixture.loadable.loadable.StorageMediumAdapter
Adapts google.appengine.api.datastore.Entity objects and any
other object that is an instance of Entity
-
save(row, column_vals)
- Save this entity to the Datastore
-
clear(obj)
- Delete this entity from the Datastore