diff --git a/tests/views/test_settings.py b/tests/views/test_settings.py index cc16eb5..8033edd 100644 --- a/tests/views/test_settings.py +++ b/tests/views/test_settings.py @@ -1,5 +1,6 @@ # -*- coding: utf-8; -*- +import sys from unittest.mock import patch import colander @@ -57,9 +58,11 @@ class TestAppInfoView(WebTestCase): # invalid with patch.object(self.request, "GET", new={"tzname": "bad_name"}): result = view.configure_check_timezone() - self.assertEqual( - result["invalid"], "'No time zone found with key bad_name'" - ) + # nb. this check won't work for python 3.8 + if sys.version_info >= (3, 9): + self.assertEqual( + result["invalid"], "'No time zone found with key bad_name'" + ) # missing input with patch.object(self.request, "GET", new={}):