Support Flask-SQLAlchemy 3.0
Since Flask-SQLAlchemy 3.0, it is necessary to manually push Flask
application context when needed (in tests, in CLI commands not
registered through Flask). This patch adjusts our code to set the app
context when needed.
I chose a bit different approach to Frantisek's PR #262, using pytest
fixtures instead. While doing that, I converted all old xunit-style
classes to pytest fixtures. One of the reasons is that xunit-style
special methods can't receive fixture arguments, but it's not
communicated and confuses the developer, so I converted them everywhere.
Fixes: https://pagure.io/fedora-qa/blockerbugs/issue/260
Related: https://pagure.io/fedora-qa/blockerbugs/pull-request/262