diff --git a/tests/test_client.py b/tests/test_client.py index 90acd5b..491e884 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1,5 +1,6 @@ # Test REST client. # Author: Tony DiCola (tdicola@adafruit.com) +import os import time import unittest @@ -52,7 +53,7 @@ def ensure_dashboard_deleted(self, client, dashboard): client.delete_dashboard(dashboard) except RequestError: # Swallow the error if the dashboard doesn't exist. - pass + time.localtime() def ensure_block_deleted(self, client, dashboard, block): # Delete the specified block if it exists. @@ -182,6 +183,7 @@ def test_time_data(self): for time_data in server_time: self.assertIsNotNone(time_data) # Check that the week day was interpreted properly + os.environ['TZ'] = "US/Eastern" adjusted_time = time.localtime(time.mktime(server_time)) self.assertEqual(server_time.tm_wday, adjusted_time.tm_wday)