test: verify independent guests and recovery on private displays
This commit is contained in:
@@ -33,6 +33,11 @@ class ProfilesTests(unittest.TestCase):
|
||||
with self.subTest(field=field, value=value), self.assertRaises(ValueError):
|
||||
Profile('guest', self.iso, **{field: value})
|
||||
|
||||
def test_invalid_media_path_types(self):
|
||||
for iso in (True, 42, ''):
|
||||
with self.subTest(iso=iso), self.assertRaises(ValueError):
|
||||
Profile('guest', iso)
|
||||
|
||||
def test_duplicate_profile_preserves_existing(self):
|
||||
dest = self.root / 'guest.toml'
|
||||
save_profile(dest, Profile('guest', self.iso))
|
||||
|
||||
@@ -82,7 +82,8 @@ class SessionTests(unittest.TestCase):
|
||||
self.assertEqual(main(base + ['view', 'alpha']), 1)
|
||||
self.assertIn('viewer', error.getvalue().lower())
|
||||
|
||||
def test_windowed_viewer_exit_leaves_vm_control_untouched(self):
|
||||
def test_windowed_viewer_exit_with_missing_iso_leaves_vm_control_untouched(self):
|
||||
self.iso.unlink()
|
||||
viewer = self.root / 'fake-viewer'
|
||||
viewer.write_text('#!/bin/sh\ncase "$1" in --help) echo --hide-toolbar; exit 0;; esac\nexit 7\n')
|
||||
viewer.chmod(0o700)
|
||||
|
||||
Reference in New Issue
Block a user