ignore cache write test case on older python versions

This commit is contained in:
Michael Pöhn 2022-09-30 14:54:28 +02:00
parent 59b1899d79
commit b7233dfb2e
1 changed files with 4 additions and 0 deletions

View File

@ -545,6 +545,10 @@ class Test_SignatureDataController(unittest.TestCase):
with self.assertRaises(fdroidserver.scanner.SignatureDataVersionMismatchException):
sdc.check_data_version()
@unittest.skipIf(
sys.version_info < (3, 9, 0),
"mock_open doesn't allow easy access to written data in older python versions",
)
def test_write_to_cache(self):
open_func = mock.mock_open()
sdc = fdroidserver.scanner.SignatureDataController('nnn', 'fff.yml', 'https://example.com/test.json')