Skip to content

Commit

Permalink
qvm-template: Fix compatibility with Python 3.6 in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WillyPillow committed Sep 6, 2020
1 parent 554459e commit 161ff01
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 @@ -183,7 +183,7 @@ def test_100_install_local_success(
mock_call.side_effect = self.add_new_vm_side_effect
mock_time = mock.Mock(wraps=datetime.datetime)
mock_time.today.return_value = \
datetime.datetime.fromisoformat(install_time)
datetime.datetime(2020, 9, 1, 15, 30, tzinfo=datetime.timezone.utc)
with mock.patch('builtins.open', mock.mock_open()) as mock_open, \
mock.patch('datetime.datetime', new=mock_time), \
mock.patch('tempfile.TemporaryDirectory') as mock_tmpdir, \
Expand Down Expand Up @@ -314,7 +314,7 @@ def test_101_install_local_postprocargs_success(
mock_call.side_effect = self.add_new_vm_side_effect
mock_time = mock.Mock(wraps=datetime.datetime)
mock_time.today.return_value = \
datetime.datetime.fromisoformat(install_time)
datetime.datetime(2020, 9, 1, 15, 30, tzinfo=datetime.timezone.utc)
with mock.patch('builtins.open', mock.mock_open()) as mock_open, \
mock.patch('datetime.datetime', new=mock_time), \
mock.patch('tempfile.TemporaryDirectory') as mock_tmpdir, \
Expand Down

0 comments on commit 161ff01

Please sign in to comment.