From 161ff01d7d548ccbc0e6c236352df2333e8b1761 Mon Sep 17 00:00:00 2001 From: WillyPillow Date: Mon, 7 Sep 2020 02:12:03 +0800 Subject: [PATCH] qvm-template: Fix compatibility with Python 3.6 in tests --- 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 e8a55d81..6659a7c0 100644 --- a/qubesadmin/tests/tools/qvm_template.py +++ b/qubesadmin/tests/tools/qvm_template.py @@ -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, \ @@ -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, \