def test_default_install_scope(first_app_config, tmp_path): "By default, app should be installed per user." command = WindowsMSICreateCommand(base_path=tmp_path) context = command.output_format_template_context(first_app_config) assert context['install_scope'] == 'perUser'
def test_guid(first_app_config, tmp_path): "A preictable GUID will be generated from the bundle." command = WindowsMSICreateCommand(base_path=tmp_path) context = command.output_format_template_context(first_app_config) assert context['guid'] == 'd666a4f1-c7b7-52cc-888a-3a35a7cc97e5'
def test_version_triple(first_app_config, tmp_path, version, version_triple): command = WindowsMSICreateCommand(base_path=tmp_path) first_app_config.version = version context = command.output_format_template_context(first_app_config) assert context['version_triple'] == version_triple
def test_per_user_install_scope(first_app_config, tmp_path): "App can be set to have explocit per-user scope." command = WindowsMSICreateCommand(base_path=tmp_path) first_app_config.system_installer = False context = command.output_format_template_context(first_app_config) assert context['install_scope'] == "perUser"
def test_per_machine_install_scope(first_app_config, tmp_path): "By default, app should be installed per user." command = WindowsMSICreateCommand(base_path=tmp_path) first_app_config.system_installer = True context = command.output_format_template_context(first_app_config) assert context['install_scope'] == "perMachine"
def test_explicit_guid(first_app_config, tmp_path): "If a GUID is explicitly provided, it is used." command = WindowsMSICreateCommand(base_path=tmp_path) first_app_config.guid = 'e822176f-b755-589f-849c-6c6600f7efb1' context = command.output_format_template_context(first_app_config) # Explicitly provided GUID is used. assert context['guid'] == 'e822176f-b755-589f-849c-6c6600f7efb1'
def test_explicit_version_triple(first_app_config, tmp_path): command = WindowsMSICreateCommand(base_path=tmp_path) first_app_config.version = '1.2.3a1' first_app_config.version_triple = '2.3.4' context = command.output_format_template_context(first_app_config) # Explicit version triple is used. assert context['version_triple'] == '2.3.4'