コード例 #1
0
ファイル: test_config.py プロジェクト: zippyy/rtv
def test_copy_default_mailcap():
    "Make sure the example mailcap file was included in the package"

    with NamedTemporaryFile() as fp:
        with mock.patch('rtv.config.six.moves.input', return_value='y'):
            copy_default_mailcap(fp.name)
            assert fp.read()
            # Check that the permissions were changed
            permissions = os.stat(fp.name).st_mode & 0o777
            assert permissions == 0o664
コード例 #2
0
ファイル: test_config.py プロジェクト: 5225225/rtv
def test_copy_default_mailcap():
    "Make sure the example mailcap file was included in the package"

    with NamedTemporaryFile() as fp:
        with mock.patch('rtv.config.six.moves.input', return_value='y'):
            copy_default_mailcap(fp.name)
            assert fp.read()
            # Check that the permissions were changed
            permissions = os.stat(fp.name).st_mode & 0o777
            assert permissions == 0o664