def test_classify_indices_to_db_not_connected(mock_db_connected, mock_workers):
with main.app.app_context():
with patch('urbansearch.main.request') as mock_flask_request:
mock_db_connected.return_value = False
from testfixtures import LogCapture
with LogCapture() as l:
main.classify_indices_to_db()
assert (l.__sizeof__()) > 0
assert not mock_workers.called
评论列表
文章目录