From e9adcddf7f8dba6db4c584019f8734e662de61c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 18 Jan 2021 17:06:08 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Fix=20py2.7=20test=20issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We still need to stay compatible to py2, so we need to import mock, not unittest.mock. --- tests/printer/test_script.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/printer/test_script.py b/tests/printer/test_script.py index 57a0fefb4..b580e4ef7 100644 --- a/tests/printer/test_script.py +++ b/tests/printer/test_script.py @@ -1,8 +1,10 @@ +# -*- coding: utf-8 -*- __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2021 The OctoPrint Project - Released under terms of the AGPLv3 License" import unittest -from unittest.mock import ANY, MagicMock, call, patch + +from mock import ANY, MagicMock, call, patch from octoprint.printer.standard import Printer