improves testing: fixing `skip_unless` decorator and Flask-SQLAlchemy session usage in tests