I followed this how-to (http://farmdev.com/projects/fixture/using-
fixture-with-pylons.html) on using fixtures with Pylons, which was
written for 0.9.7. In the `tests/__init__.py` file, an
`SQLAlchemyFixture` object needs to be instantiated, which requires a
reference to an SQLAlchemy engine. I'm sure this must be loaded
somewhere in the environment, but the suggested `meta.engine` is not
correct for 1.0 and I was not able to find it, so I went with this
instead.
import sqlalchemy as sa
engine = sa.create_engine('mysql://user:p...@localhost:3306/app_name')
dbfixture = SQLAlchemyFixture(
env = model,
engine = engine,
style = NamedDataStyle())
Ugly. Can anyone tell me the best way to reference the engine? Thanks.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.