I'm unable to write tests as they don't setup correctly the model.
I have a websetup.py that creates the schema by calling
model.metadata.create_all(bind=config['pylons.app_globals'].sa_engine) and
then checks if some groups in tg_group already exist, if they don't it creates
them.
When I call paster setup-app development.ini everything works as expected
When the test suite calls websetup.py from TestController.setUp the
websetup.py fails when checking for the existing groups saying that
"(OperationalError) no such table: tg_group" even if the line before was the
metadata.create_all call.
My test.ini has the default configuration.
I think that I'm missing something, but I'm unable to find some extensive doc
about tests in TG2.
I also have to say that if I change
sqlalchemy.url = sqlite:///:memory:
to
sqlalchemy.url = sqlite:///foobar.db
in test.ini
everything works as expected. But I should be able to make tests work also on
memory db