qubesadmin.tests package¶
Subpackages¶
- qubesadmin.tests.backup package
- Submodules
- qubesadmin.tests.backup.backupcompatibility module
AppProxy
MockFirewall
MockVolume
TC_00_QubesXML
TC_10_BackupCompatibility
TC_10_BackupCompatibility.append_backup_stream()
TC_10_BackupCompatibility.assertDirectoryExists()
TC_10_BackupCompatibility.assertDom0Restored()
TC_10_BackupCompatibility.assertFileExists()
TC_10_BackupCompatibility.calculate_hmac()
TC_10_BackupCompatibility.cleanup_tmpdir()
TC_10_BackupCompatibility.create_appmenus()
TC_10_BackupCompatibility.create_dom0_files()
TC_10_BackupCompatibility.create_limited_tmpdir()
TC_10_BackupCompatibility.create_private_img()
TC_10_BackupCompatibility.create_v1_files()
TC_10_BackupCompatibility.create_v3_backup()
TC_10_BackupCompatibility.create_v4_backup()
TC_10_BackupCompatibility.create_v4_files()
TC_10_BackupCompatibility.create_volatile_img()
TC_10_BackupCompatibility.create_whitelisted_appmenus()
TC_10_BackupCompatibility.dom0_dirs
TC_10_BackupCompatibility.dom0_files
TC_10_BackupCompatibility.fullpath()
TC_10_BackupCompatibility.handle_v3_file()
TC_10_BackupCompatibility.handle_v4_file()
TC_10_BackupCompatibility.mock_appmenus()
TC_10_BackupCompatibility.scrypt_encrypt()
TC_10_BackupCompatibility.setup_expected_calls()
TC_10_BackupCompatibility.storage_pool
TC_10_BackupCompatibility.tearDown()
TC_10_BackupCompatibility.test_210_r2()
TC_10_BackupCompatibility.test_220_r2_encrypted()
TC_10_BackupCompatibility.test_230_r2_uncompressed()
TC_10_BackupCompatibility.test_230_r4()
TC_10_BackupCompatibility.test_230_r4_compressed()
TC_10_BackupCompatibility.test_230_r4_custom_cmpression()
TC_10_BackupCompatibility.test_230_r4_uncommon_cmpression_forced()
TC_10_BackupCompatibility.test_230_r4_uncommon_compression()
TC_10_BackupCompatibility.test_300_r4_no_space()
TC_11_BackupCompatibilityIntoLVM
- Module contents
BackupTestCase
BackupTestCase.BackupErrorHandler
BackupTestCase.assertCorrectlyRestored()
BackupTestCase.create_backup_vms()
BackupTestCase.create_full_image()
BackupTestCase.create_sparse()
BackupTestCase.fill_image()
BackupTestCase.make_backup()
BackupTestCase.make_vm_name()
BackupTestCase.restore_backup()
BackupTestCase.setUp()
BackupTestCase.tearDown()
BackupTestCase.vm_checksum()
- qubesadmin.tests.tools package
- Submodules
- qubesadmin.tests.tools.init module
TC_00_PropertyAction
TC_01_SinglePropertyAction
TC_01_SinglePropertyAction.test_000_help()
TC_01_SinglePropertyAction.test_001_help_const()
TC_01_SinglePropertyAction.test_100_default()
TC_01_SinglePropertyAction.test_101_set_prop()
TC_01_SinglePropertyAction.test_102_set_prop_dest()
TC_01_SinglePropertyAction.test_103_set_prop_const()
TC_01_SinglePropertyAction.test_104_set_prop_positional()
- qubesadmin.tests.tools.qubes_prefs module
- qubesadmin.tests.tools.qvm_backup module
TC_00_qvm_backup
TC_00_qvm_backup.test_000_write_backup_profile()
TC_00_qvm_backup.test_001_write_backup_profile_include()
TC_00_qvm_backup.test_002_write_backup_profile_exclude()
TC_00_qvm_backup.test_003_write_backup_with_passphrase()
TC_00_qvm_backup.test_004_write_backup_profile_no_compress()
TC_00_qvm_backup.test_010_main_save_profile_cancel()
TC_00_qvm_backup.test_011_main_save_profile_confirm()
TC_00_qvm_backup.test_012_main_existing_profile()
TC_00_qvm_backup.test_013_main_new_profile_vm()
TC_00_qvm_backup.test_014_main_passphrase_file()
- qubesadmin.tests.tools.qvm_backup_restore module
TC_00_qvm_backup_restore
TC_00_qvm_backup_restore.assertAppropriateLogging()
TC_00_qvm_backup_restore.setUp()
TC_00_qvm_backup_restore.tearDown()
TC_00_qvm_backup_restore.test_000_simple()
TC_00_qvm_backup_restore.test_001_selected_vms()
TC_00_qvm_backup_restore.test_010_handle_broken_no_problems()
TC_00_qvm_backup_restore.test_011_handle_broken_missing_template()
TC_00_qvm_backup_restore.test_012_handle_broken_missing_netvm()
TC_00_qvm_backup_restore.test_100_restore_in_dispvm_parser()
- qubesadmin.tests.tools.qvm_check module
TC_00_qvm_check
TC_00_qvm_check.test_000_exists()
TC_00_qvm_check.test_001_exists_multi()
TC_00_qvm_check.test_002_exists_verbose()
TC_00_qvm_check.test_003_exists_multi_verbose()
TC_00_qvm_check.test_004_running_verbose()
TC_00_qvm_check.test_005_running_multi_verbose()
TC_00_qvm_check.test_006_running_multi_verbose2()
TC_00_qvm_check.test_007_not_running_verbose()
TC_00_qvm_check.test_008_paused()
TC_00_qvm_check.test_009_paused_multi()
TC_00_qvm_check.test_010_template()
TC_00_qvm_check.test_011_template_multi()
TC_00_qvm_check.test_012_networked()
TC_00_qvm_check.test_013_networked_multi()
- qubesadmin.tests.tools.qvm_clone module
- qubesadmin.tests.tools.qvm_create module
TC_00_qvm_create
TC_00_qvm_create.test_000_just_appvm()
TC_00_qvm_create.test_001_missing_vm()
TC_00_qvm_create.test_002_custom_template()
TC_00_qvm_create.test_003_properties()
TC_00_qvm_create.test_004_pool()
TC_00_qvm_create.test_005_pools()
TC_00_qvm_create.test_005_root_copy_from()
TC_00_qvm_create.test_006_root_move_from()
TC_00_qvm_create.test_007_root_move_copy_both()
TC_00_qvm_create.test_008_root_invalid_path()
TC_00_qvm_create.test_009_help_classes()
TC_00_qvm_create.test_011_standalonevm()
TC_00_qvm_create.test_012_invalid_label()
TC_00_qvm_create.test_013_root_copy_from_template_based()
TC_00_qvm_create.test_014_standalone_shortcut()
TC_00_qvm_create.test_015_disp_shortcut()
- qubesadmin.tests.tools.qvm_device module
TC_00_qvm_device
TC_00_qvm_device.setUp()
TC_00_qvm_device.test_000_list_all()
TC_00_qvm_device.test_001_list_persistent_attach()
TC_00_qvm_device.test_002_list_list_temp_attach()
TC_00_qvm_device.test_010_attach()
TC_00_qvm_device.test_011_attach_options()
TC_00_qvm_device.test_011_attach_persistent()
TC_00_qvm_device.test_012_attach_invalid()
TC_00_qvm_device.test_013_attach_invalid2()
TC_00_qvm_device.test_014_attach_invalid3()
TC_00_qvm_device.test_020_detach()
TC_00_qvm_device.test_021_detach_unknown()
TC_00_qvm_device.test_022_detach_all()
- qubesadmin.tests.tools.qvm_features module
- qubesadmin.tests.tools.qvm_firewall module
TC_00_RuleAction
TC_00_RuleAction.setUp()
TC_00_RuleAction.test_000_named_opts()
TC_00_RuleAction.test_001_unnamed_opts()
TC_00_RuleAction.test_002_unnamed_opts()
TC_00_RuleAction.test_003_mixed_opts()
TC_00_RuleAction.test_004_expire_absolute()
TC_00_RuleAction.test_005_expire_relative()
TC_00_RuleAction.test_006_dsthost_aliases()
TC_00_RuleAction.test_007_none_errors()
TC_10_qvm_firewall
TC_10_qvm_firewall.setUp()
TC_10_qvm_firewall.test_000_list()
TC_10_qvm_firewall.test_001_list_default()
TC_10_qvm_firewall.test_002_list_expire()
TC_10_qvm_firewall.test_002_list_raw()
TC_10_qvm_firewall.test_003_list_raw_reload()
TC_10_qvm_firewall.test_010_add_after()
TC_10_qvm_firewall.test_011_add_before()
TC_10_qvm_firewall.test_020_del_number()
TC_10_qvm_firewall.test_021_del_rule()
TC_10_qvm_firewall.test_030_reset()
- qubesadmin.tests.tools.qvm_kill module
- qubesadmin.tests.tools.qvm_ls module
- qubesadmin.tests.tools.qvm_pause module
- qubesadmin.tests.tools.qvm_pool module
TC_00_qvm_pool
TC_00_qvm_pool.test_000_list()
TC_00_qvm_pool.test_010_drivers()
TC_00_qvm_pool.test_020_add()
TC_00_qvm_pool.test_021_add_multiple()
TC_00_qvm_pool.test_030_remove()
TC_00_qvm_pool.test_031_remove_multiple()
TC_00_qvm_pool.test_040_info()
TC_00_qvm_pool.test_050_set()
TC_00_qvm_pool.test_051_set_invalid()
- qubesadmin.tests.tools.qvm_prefs module
TC_00_qvm_prefs
TC_00_qvm_prefs.test_000_list()
TC_00_qvm_prefs.test_001_no_vm()
TC_00_qvm_prefs.test_002_set_property()
TC_00_qvm_prefs.test_003_invalid_property()
TC_00_qvm_prefs.test_004_set_invalid_property()
TC_00_qvm_prefs.test_005_get_str()
TC_00_qvm_prefs.test_006_get_vm()
TC_00_qvm_prefs.test_007_get_vm_none()
TC_00_qvm_prefs.test_008_set_vm_prop_none()
- qubesadmin.tests.tools.qvm_remove module
- qubesadmin.tests.tools.qvm_run module
TC_00_qvm_run
TC_00_qvm_run.default_filter_esc()
TC_00_qvm_run.setUp()
TC_00_qvm_run.test_000_run_single()
TC_00_qvm_run.test_000_run_single_auto_nogui()
TC_00_qvm_run.test_001_run_multiple()
TC_00_qvm_run.test_002_color_output()
TC_00_qvm_run.test_002_passio()
TC_00_qvm_run.test_002_passio_service()
TC_00_qvm_run.test_003_no_color_output()
TC_00_qvm_run.test_004_no_filter_esc()
TC_00_qvm_run.test_005_localcmd()
TC_00_qvm_run.test_006_run_single_with_gui()
TC_00_qvm_run.test_007_run_service_with_gui()
TC_00_qvm_run.test_008_dispvm_remote()
TC_00_qvm_run.test_009_dispvm_remote_specific()
TC_00_qvm_run.test_010_dispvm_local()
TC_00_qvm_run.test_011_dispvm_local_specific()
TC_00_qvm_run.test_012_exclude()
TC_00_qvm_run.test_013_no_autostart()
TC_00_qvm_run.test_014_dispvm_local_gui()
TC_00_qvm_run.test_015_dispvm_local_no_gui()
TC_00_qvm_run.test_016_run_single_windows()
TC_00_qvm_run.test_020_run_exec_with_vmexec_not_supported()
TC_00_qvm_run.test_020_run_exec_with_vmexec_supported()
TC_00_qvm_run.test_021_paused_vm()
TC_00_qvm_run.test_022_no_shell()
TC_00_qvm_run.test_023_dispvm_no_shell()
TC_00_qvm_run.test_024_no_shell_dashdash()
TC_00_qvm_run.test_025_no_shell_double_dashdash()
TC_00_qvm_run.test_026_no_shell_double_dashdash()
TC_00_qvm_run.test_027_no_shell_dispvm()
TC_00_qvm_run.test_028_argparse_bug_workaround()
TC_00_qvm_run.test_029_command_is_dashdash()
TC_00_qvm_run.test_030_no_shell_dispvm()
TC_00_qvm_run.test_031_argparse_bug_workaround()
TC_00_qvm_run.test_032_argparse_bug_workaround_unnamed_dispvm()
- qubesadmin.tests.tools.qvm_service module
TC_00_qvm_service
TC_00_qvm_service.test_000_list()
TC_00_qvm_service.test_001_list_l()
TC_00_qvm_service.test_002_enable()
TC_00_qvm_service.test_003_enable_opt()
TC_00_qvm_service.test_004_enable_opt_mixed()
TC_00_qvm_service.test_005_disable()
TC_00_qvm_service.test_006_disable_opt()
TC_00_qvm_service.test_007_get()
TC_00_qvm_service.test_008_del()
TC_00_qvm_service.test_009_del_legacy()
TC_00_qvm_service.test_010_set_invalid()
- qubesadmin.tests.tools.qvm_shutdown module
TC_00_qvm_shutdown
TC_00_qvm_shutdown.test_000_with_vm()
TC_00_qvm_shutdown.test_001_missing_vm()
TC_00_qvm_shutdown.test_002_invalid_vm()
TC_00_qvm_shutdown.test_003_not_running()
TC_00_qvm_shutdown.test_004_multiple_vms()
TC_00_qvm_shutdown.test_010_wait()
TC_00_qvm_shutdown.test_012_wait_all()
TC_00_qvm_shutdown.test_015_wait_all_kill_timeout()
- qubesadmin.tests.tools.qvm_start module
TC_00_qvm_start
TC_00_qvm_start.test_000_with_vm()
TC_00_qvm_start.test_001_missing_vm()
TC_00_qvm_start.test_002_invalid_vm()
TC_00_qvm_start.test_003_already_running()
TC_00_qvm_start.test_010_drive_cdrom()
TC_00_qvm_start.test_011_drive_disk()
TC_00_qvm_start.test_012_drive_disk()
TC_00_qvm_start.test_013_drive_loop_local()
TC_00_qvm_start.test_014_drive_loop_remote()
TC_00_qvm_start.test_015_drive_failed_start()
TC_00_qvm_start.test_016_drive_failed_attach()
- qubesadmin.tests.tools.qvm_start_daemon module
TC_00_qvm_start_gui
TC_00_qvm_start_gui.mock_coroutine()
TC_00_qvm_start_gui.run_common_args()
TC_00_qvm_start_gui.setUp()
TC_00_qvm_start_gui.setup_common_args()
TC_00_qvm_start_gui.test_000_kde_args()
TC_00_qvm_start_gui.test_010_common_args()
TC_00_qvm_start_gui.test_011_common_args_debug()
TC_00_qvm_start_gui.test_012_common_args_rpc_clipboard()
TC_00_qvm_start_gui.test_013_common_args_guid_config()
TC_00_qvm_start_gui.test_020_start_gui_for_vm()
TC_00_qvm_start_gui.test_021_start_gui_for_vm_hvm()
TC_00_qvm_start_gui.test_022_start_gui_for_vm_hvm_stubdom()
TC_00_qvm_start_gui.test_030_start_gui_for_stubdomain()
TC_00_qvm_start_gui.test_031_start_gui_for_stubdomain_forced()
TC_00_qvm_start_gui.test_040_start_gui()
TC_00_qvm_start_gui.test_041_start_gui_running()
TC_00_qvm_start_gui.test_042_start_gui_pvh()
TC_00_qvm_start_gui.test_050_get_monitor_layout1()
TC_00_qvm_start_gui.test_051_get_monitor_layout_multiple()
TC_00_qvm_start_gui.test_052_get_monitor_layout_hidpi1()
TC_00_qvm_start_gui.test_052_get_monitor_layout_hidpi2()
TC_00_qvm_start_gui.test_052_get_monitor_layout_hidpi3()
TC_00_qvm_start_gui.test_060_send_monitor_layout()
TC_00_qvm_start_gui.test_061_send_monitor_layout_exclude()
TC_00_qvm_start_gui.test_062_send_monitor_layout_not_running()
TC_00_qvm_start_gui.test_063_send_monitor_layout_signal_existing()
TC_00_qvm_start_gui.test_070_send_monitor_layout_all()
- qubesadmin.tests.tools.qvm_tags module
- qubesadmin.tests.tools.qvm_template_postprocess module
QubesLocalMock
TC_00_qvm_template_postprocess
TC_00_qvm_template_postprocess.add_new_vm_side_effect()
TC_00_qvm_template_postprocess.setUp()
TC_00_qvm_template_postprocess.tearDown()
TC_00_qvm_template_postprocess.test_000_import_root_img_raw()
TC_00_qvm_template_postprocess.test_001_import_root_img_tar()
TC_00_qvm_template_postprocess.test_001_import_root_img_tar_pre_mar_2024()
TC_00_qvm_template_postprocess.test_002_import_root_img_no_overwrite()
TC_00_qvm_template_postprocess.test_005_reset_private_img()
TC_00_qvm_template_postprocess.test_010_import_appmenus()
TC_00_qvm_template_postprocess.test_011_import_appmenus_as_root()
TC_00_qvm_template_postprocess.test_012_import_appmenus_missing_user()
TC_00_qvm_template_postprocess.test_020_post_install()
TC_00_qvm_template_postprocess.test_021_post_install_reinstall()
TC_00_qvm_template_postprocess.test_022_post_install_skip_start()
TC_00_qvm_template_postprocess.test_030_pre_remove()
TC_00_qvm_template_postprocess.test_031_pre_remove_existing_appvm()
TC_00_qvm_template_postprocess.test_040_missing_really()
TC_00_qvm_template_postprocess.test_050_template_config()
TC_00_qvm_template_postprocess.test_051_template_config_invalid()
TC_00_qvm_template_postprocess.test_052_template_config_virt_mode_pv()
TC_00_qvm_template_postprocess.wait_for_shutdown()
- qubesadmin.tests.tools.qvm_unpause module
- qubesadmin.tests.tools.qvm_volume module
TC_00_qvm_volume
TC_00_qvm_volume.setup_expected_calls_for_list()
TC_00_qvm_volume.test_000_list()
TC_00_qvm_volume.test_001_list_domain()
TC_00_qvm_volume.test_002_list_domain_pool()
TC_00_qvm_volume.test_003_list_pool()
TC_00_qvm_volume.test_004_list_multiple_domains()
TC_00_qvm_volume.test_005_list_default_action()
TC_00_qvm_volume.test_010_extend()
TC_00_qvm_volume.test_011_extend_error()
TC_00_qvm_volume.test_012_extend_deny_shrink()
TC_00_qvm_volume.test_013_resize_force_shrink()
TC_00_qvm_volume.test_020_revert()
TC_00_qvm_volume.test_021_revert_error()
TC_00_qvm_volume.test_022_revert_no_snapshots()
TC_00_qvm_volume.test_023_revert_specific()
TC_00_qvm_volume.test_030_set_revisions_to_keep()
TC_00_qvm_volume.test_031_set_rw()
TC_00_qvm_volume.test_032_set_invalid()
TC_00_qvm_volume.test_033_set_ephemeral()
TC_00_qvm_volume.test_040_info()
TC_00_qvm_volume.test_041_info_no_revisions()
TC_00_qvm_volume.test_042_info_single_prop()
TC_00_qvm_volume.test_043_info_revisions_only()
TC_00_qvm_volume.test_044_info_no_ephemeral()
TC_00_qvm_volume.test_050_import_file()
TC_00_qvm_volume.test_051_import_stdin()
TC_00_qvm_volume.test_052_import_file_size()
TC_00_qvm_volume.test_053_import_file_matching_size()
TC_00_qvm_volume.test_053_import_file_noresize()
- Module contents
- qubesadmin.tests.vm package
- Submodules
- qubesadmin.tests.vm.actions module
TC_00_Actions
TC_00_Actions.test_000_start()
TC_00_Actions.test_001_shutdown()
TC_00_Actions.test_002_kill()
TC_00_Actions.test_003_pause()
TC_00_Actions.test_004_unpause()
TC_00_Actions.test_005_suspend()
TC_00_Actions.test_006_resume()
TC_00_Actions.test_010_run_linux()
TC_00_Actions.test_011_run_windows()
TC_00_Actions.test_015_run_with_args_shell()
TC_00_Actions.test_016_run_with_args_exec()
- qubesadmin.tests.vm.dispvm module
- qubesadmin.tests.vm.properties module
TC_00_Properties
TC_00_Properties.test_000_list()
TC_00_Properties.test_001_get_str()
TC_00_Properties.test_002_get_int()
TC_00_Properties.test_003_get_bool()
TC_00_Properties.test_004_get_vm()
TC_00_Properties.test_005_get_none_vm()
TC_00_Properties.test_006_get_none_bool()
TC_00_Properties.test_007_get_none_int()
TC_00_Properties.test_008_get_none_str()
TC_00_Properties.test_010_get_default()
TC_00_Properties.test_011_get_default()
TC_00_Properties.test_012_get_invalid()
TC_00_Properties.test_020_set_str()
TC_00_Properties.test_021_set_int()
TC_00_Properties.test_022_set_bool()
TC_00_Properties.test_023_set_vm()
TC_00_Properties.test_024_set_none()
TC_00_Properties.test_030_reset()
TC_00_Properties.test_031_reset()
TC_00_Properties.test_040_get_default()
TC_00_Properties.test_041_get_default_int()
TC_00_Properties.test_042_get_default_none()
TC_00_Properties.test_050_get_all()
TC_00_Properties.test_051_get_all_fallback()
TC_01_SpecialCases
TC_01_SpecialCases.test_000_get_name()
TC_01_SpecialCases.test_001_set_name()
TC_01_SpecialCases.test_010_power_state_running()
TC_01_SpecialCases.test_011_power_state_paused()
TC_01_SpecialCases.test_012_power_state_halted()
TC_01_SpecialCases.test_012_power_state_transient()
TC_01_SpecialCases.test_015_mem()
- qubesadmin.tests.vm.storage module
- Module contents
Submodules¶
qubesadmin.tests.app module¶
- class qubesadmin.tests.app.TC_00_VMCollection(methodName='runTest')[source]¶
Bases:
QubesTestCase
- class qubesadmin.tests.app.TC_10_QubesBase(methodName='runTest')[source]¶
Bases:
QubesTestCase
- class qubesadmin.tests.app.TC_20_QubesLocal(methodName='runTest')[source]¶
Bases:
TestCase
qubesadmin.tests.devices module¶
- class qubesadmin.tests.devices.TC_00_DeviceCollection(methodName='runTest')[source]¶
Bases:
QubesTestCase
qubesadmin.tests.errors module¶
qubesadmin.tests.events module¶
- class qubesadmin.tests.events.TC_00_Events(methodName='runTest')[source]¶
Bases:
QubesTestCase
qubesadmin.tests.features module¶
- class qubesadmin.tests.features.TC_00_Features(methodName='runTest')[source]¶
Bases:
QubesTestCase
qubesadmin.tests.firewall module¶
Tests for firewall API. This is mostly copy from core-admin
- class qubesadmin.tests.firewall.TC_00_RuleChoice(methodName='runTest')[source]¶
Bases:
QubesTestCase
- class qubesadmin.tests.firewall.TC_01_Action(methodName='runTest')[source]¶
Bases:
QubesTestCase
- class qubesadmin.tests.firewall.TC_02_DstHost(methodName='runTest')[source]¶
Bases:
QubesTestCase
- class qubesadmin.tests.firewall.TC_02_Proto(methodName='runTest')[source]¶
Bases:
QubesTestCase
- class qubesadmin.tests.firewall.TC_03_DstPorts(methodName='runTest')[source]¶
Bases:
QubesTestCase
- class qubesadmin.tests.firewall.TC_04_IcmpType(methodName='runTest')[source]¶
Bases:
QubesTestCase
- class qubesadmin.tests.firewall.TC_05_SpecialTarget(methodName='runTest')[source]¶
Bases:
QubesTestCase
- class qubesadmin.tests.firewall.TC_06_Expire(methodName='runTest')[source]¶
Bases:
QubesTestCase
- class qubesadmin.tests.firewall.TC_07_Comment(methodName='runTest')[source]¶
Bases:
QubesTestCase
- class qubesadmin.tests.firewall.TC_10_Rule(methodName='runTest')[source]¶
Bases:
QubesTestCase
- class qubesadmin.tests.firewall.TC_11_Firewall(methodName='runTest')[source]¶
Bases:
QubesTestCase
qubesadmin.tests.label module¶
- class qubesadmin.tests.label.TC_00_Label(methodName='runTest')[source]¶
Bases:
QubesTestCase
qubesadmin.tests.storage module¶
- class qubesadmin.tests.storage.TestPool(methodName='runTest')[source]¶
Bases:
QubesTestCase
- class qubesadmin.tests.storage.TestPoolVolume(methodName='runTest')[source]¶
Bases:
TestVMVolume
- class qubesadmin.tests.storage.TestVMVolume(methodName='runTest')[source]¶
Bases:
QubesTestCase
Module contents¶
- class qubesadmin.tests.QubesTest[source]¶
Bases:
QubesBase
- actual_calls = None¶
actual calls made
- expected_calls = None¶
expected Admin API calls and saved replies for them
- expected_service_calls = None¶
expected qrexec service calls and saved replies for them
- qubesd_call(dest, method, arg=None, payload=None, payload_stream=None)[source]¶
Execute Admin API method.
If payload and payload_stream are both specified, they will be sent in that order.
- Parameters:
dest – Destination VM name
method – Full API method name (‘admin…’)
arg – Method argument (if any)
payload – Payload send to the method
payload_stream – file-like object to read payload from
- Returns:
Data returned by qubesd (string)
Warning
payload_stream will get closed by this function
- run_service(dest, service, **kwargs)[source]¶
Run qrexec service in a given destination
kwargs are passed verbatim to
subprocess.Popen()
.- Parameters:
dest (str) – Destination - may be a VM name or empty string for default (for a given service)
service (str) – service name
filter_esc (bool) – filter escape sequences to protect terminal emulator
user (str) – username to run service as
localcmd (str) – Command to connect stdin/stdout to
wait (bool) – Wait service run
autostart (bool) – Automatically start the target VM
- Return type:
- service_calls = None¶
rpc service calls
- class qubesadmin.tests.QubesTestCase(methodName='runTest')[source]¶
Bases:
TestCase
- assertNotRaises(excClass, callableObj=None, *args, **kwargs)[source]¶
Fail if an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is raised, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception.
If called with callableObj omitted or None, will return a context object used like this:
with self.assertRaises(SomeException): do_something()
The context manager keeps a reference to the exception as the ‘exception’ attribute. This allows you to inspect the exception after the assertion:
with self.assertRaises(SomeException) as cm: do_something() the_exception = cm.exception self.assertEqual(the_exception.error_code, 3)
- class qubesadmin.tests.TestProcess(input_callback=None, stdout=None, stderr=None, stdout_data=None)[source]¶
Bases:
object