New paste Repaste Download
tmpdir = local('/tmp/pytest-of-root/pytest-9/test_query_open_subtitles0')
mock = <pytest_mock.MockFixture object at 0x7fdbff6bb220>
    def test_query_open_subtitles(tmpdir, mock):
        filename = tmpdir.join('Drive (2011) BDRip XviD-COCAIN.avi').ensure()
    
        rpc_mock = mock.patch('ss.ServerProxy', autospec=True)
        hash_mock = mock.patch('ss.calculate_hash_for_file', autospec=True)
        hash_mock.return_value = '13ab'
        rpc_mock.return_value = server = MagicMock(name='MockServer')
        server.LogIn.return_value = dict(token='TOKEN')
        server.SearchSubtitles.return_value = dict(
            data=[{'SubFileName': 'movie.srt'}])
    
>       search_results = ss.query_open_subtitles(str(filename), 'eng')
tests/test_ss.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/bin/ss.py:81: in query_open_subtitles
    guessit_query = obtain_guessit_query(movie_filename, language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
movie_filename = '/tmp/pytest-of-root/pytest-9/test_query_open_subtitles0/Drive (2011) BDRip XviD-COCAIN.avi'
language = 'eng'
    def obtain_guessit_query(movie_filename, language):
>       guess = guessit.guess_file_info(os.path.basename(movie_filename), info=['filename'])
E       AttributeError: module 'guessit' has no attribute 'guess_file_info'
/usr/local/bin/ss.py:28: AttributeError
Filename: None. Size: 1kb. View raw, , hex, or download this file.

This paste expires on 2026-04-10 08:58:59.525674+00:00. Pasted through deprecated-web.