def test_mock_classify_text_files_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_textfiles_to_db(Mock(), Mock(), 1, True)
assert (l.__sizeof__()) > 0
assert not mock_workers.called
评论列表
文章目录