From a628549ad32a8d4ce27510967e5befc1a9d73594 Mon Sep 17 00:00:00 2001 From: Levi Blaney Date: Sat, 20 Feb 2021 10:12:16 -0500 Subject: [PATCH 1/2] Fixes #3999 test fails to reload config file --- tests/settings/test_settings.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/settings/test_settings.py b/tests/settings/test_settings.py index a4815ecc1..c57521410 100644 --- a/tests/settings/test_settings.py +++ b/tests/settings/test_settings.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals +from time import sleep + """ Tests for OctoPrint's Settings class @@ -606,6 +608,9 @@ class TestSettings(unittest.TestCase): basedir, configfile = paths settings = octoprint.settings.Settings() + # Make sure the config files last modified time changes + sleep(0.3) + self.assertEqual("0.0.0.0", settings.get(["server", "host"])) # modify yaml file externally From 86aa5548c63222e9730422226fb6775c47bd6f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 22 Feb 2021 16:47:05 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9C=85=20Make=20test=20fix=20align=20wit?= =?UTF-8?q?h=20other=20such=20cases?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/settings/test_settings.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/settings/test_settings.py b/tests/settings/test_settings.py index c57521410..e2bd2ac52 100644 --- a/tests/settings/test_settings.py +++ b/tests/settings/test_settings.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals -from time import sleep - """ Tests for OctoPrint's Settings class @@ -609,7 +607,7 @@ class TestSettings(unittest.TestCase): settings = octoprint.settings.Settings() # Make sure the config files last modified time changes - sleep(0.3) + time.sleep(1.0) self.assertEqual("0.0.0.0", settings.get(["server", "host"]))