Skip to content

Commit

Permalink
tests: fix mock return values of get_dl_list when testing `qvm-templa…
Browse files Browse the repository at this point in the history
…te reinstall`
  • Loading branch information
WillyPillow committed Feb 20, 2021
1 parent fc520f8 commit a9d03d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qubesadmin/tests/tools/qvm_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -3997,7 +3997,7 @@ def test_200_reinstall_success(
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
Expand Down Expand Up @@ -4035,7 +4035,7 @@ def test_200_reinstall_success(
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,
Expand Down

0 comments on commit a9d03d1

Please sign in to comment.