SOFixture

Fixture storable by an SQLObject.

The following are attributes you can set as keywords or meta attributes (see Fixture for examples on configuring a class using meta)

  • data -- datasets to load (see Fixture for format)
  • so_class -- default SQLObject class to use (if missing, SOFixture.find_so_class will be consulted)
  • env -- dict or something with attributes
  • finder -- callable to get so_class from self.__class__ (default is find_so_from_fixture )
  • clean -- if True, object is cleanable (defaults to False)
  • autocommit -- if False (default) storage is performed in a transaction. see SOStor .

Methods

f __init__(self, data=None, so_class=None, clean=False, autocommit=False) ...

f find_so_class(self, fixture_class=None) ...

searches meta.env for an SQLObject named by meta.finder.

meta.env is a dict or something with attributes. meta.finder is a callback that accepts the fixture class name of this instance. returns SQLObject class.

f __len__(self) ...

See the source for more information.