1
0
mirror of https://github.com/gryf/fs-uae-wrapper.git synced 2025-12-29 09:52:29 +01:00

Make wrapper_archiver option mandatory in savestare module

This commit is contained in:
2017-01-07 09:43:53 +01:00
parent c5ce27e637
commit 6d84fc4b8a
3 changed files with 31 additions and 9 deletions

View File

@@ -47,7 +47,7 @@ class TestArchive(TestCase):
arch = savestate.SaveState('Config.fs-uae', utils.CmdOption(), {})
self.assertFalse(arch.run())
arch.all_options = {'wrapper': 'archive',
arch.all_options = {'wrapper': 'savestate',
'wrapper_save_state': '1',
'wrapper_archiver': 'rar'}
@@ -70,3 +70,16 @@ class TestArchive(TestCase):
save_state.return_value = True
self.assertTrue(arch.run())
@mock.patch('fs_uae_wrapper.path.which')
def test_validate_options(self, which):
which.return_value = 'unrar'
arch = savestate.SaveState('Config.fs-uae', utils.CmdOption(), {})
self.assertFalse(arch._validate_options())
arch.all_options['wrapper'] = 'savestate'
self.assertFalse(arch._validate_options())
arch.all_options['wrapper_archiver'] = 'rar'
self.assertTrue(arch._validate_options())