Allow the convenience of db fixture for all fixture scopes.
The db fixture is very convenient when writing fixtures that create objects. However, for non function-scoped fixtures using db is not possible. This PR adds db_<scope> fixtures that can be used to the same effect as db when creating fixtures that use other scopes.
NVM. For anyone attempting the same thing, this has side-effects: by enabling database access from a wider scope, (of course) ALL tests in that scope will be allowed database access.
Allow the convenience of
db
fixture for all fixture scopes.The
db
fixture is very convenient when writing fixtures that create objects. However, for non function-scoped fixtures usingdb
is not possible. This PR addsdb_<scope>
fixtures that can be used to the same effect asdb
when creating fixtures that use other scopes.