Prevent incorrect usage of _wrap_db_error()
Prevent incorrect usage of _wrap_db_error()

_wrap_db_error() has an implicit contract that it can be applied only
to methods of SQLAlchemy Session subclasses. This seems to be a good
task for an assert statement (as it's something we want to check
during development and debugging, but not something that an end user
can trigger, which would require a general runtime check).

Change-Id: I0a15bf4a90b0aea5fa715027d13d8af816f9e72d

vikt0rs/oslo.db,JioCloud/oslo.db,openstack/oslo.db,akash1808/oslo.db,malor/oslo.db,openstack/oslo.db,varunarya10/oslo.db,magic0704/oslo.db