From a9d03d199b6bbc7627adcf85911f66e6350e2143 Mon Sep 17 00:00:00 2001 From: WillyPillow Date: Sun, 21 Feb 2021 02:13:16 +0800 Subject: [PATCH] tests: fix mock return values of get_dl_list when testing `qvm-template reinstall` --- qubesadmin/tests/tools/qvm_template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qubesadmin/tests/tools/qvm_template.py b/qubesadmin/tests/tools/qvm_template.py index 8fc08ae..a295631 100644 --- a/qubesadmin/tests/tools/qvm_template.py +++ b/qubesadmin/tests/tools/qvm_template.py @@ -3997,7 +3997,7 @@ test-vm : Qubes template for fedora-31 mock_dl.return_value = {'test-vm': rpm_hdr} dl_list = { 'test-vm': qubesadmin.tools.qvm_template.DlEntry( - ('1', '4.1', '20200101'), 'qubes-templates-itl', 1048576) + ('2', '4.1', '2020'), 'qubes-templates-itl', 1048576) } mock_dl_list.return_value = dl_list mock_call.side_effect = self.add_new_vm_side_effect @@ -4035,7 +4035,7 @@ test-vm : Qubes template for fedora-31 self.assertEqual(mock_verify.mock_calls, []) # Package is extracted mock_extract.assert_called_with('test-vm', - '/var/cache/qvm-template/qubes-template-test-vm-1:4.1-20200101.rpm', + '/var/cache/qvm-template/qubes-template-test-vm-2:4.1-2020.rpm', '/var/tmp/qvm-template-tmpdir') # Expect override confirmation self.assertEqual(mock_confirm.mock_calls,