I have an application which in one of its schema files issues an SQLA query:

def helper():
    return DBSession.query(User).all()


I also have some tests which test some elements around the model
interactions and that their functions respond correctly. The setup() for
these tests create an in-memory database to work with.

The problem I am now having is that my tests will now fail, giving the good
old:

sqlalchemy.exc.UnboundExecutionError: Could not locate a bind configured on
SQL expression or this Session

on the grounds that there is no bind for DBSession in helper() above. I
understand that there is no bind, but helper is not called explicitly nor
required by anything in the tests.

I understand I have misunderstood something in the way that the
project/tests should be organised - could anybody point me in the right
direction?

Thanks,
Ben

-- 
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.

Reply via email to