Commits

Jean-Tiare Le Bigot committed e601568

add explicit unit tests for UTC tz

Comments (0)

Files changed (1)

dynamodb_mapper/tests/test_model.py

 
 from dynamodb_mapper.model import (ConnectionBorg, DynamoDBModel,
     autoincrement_int, MaxRetriesExceededError, MAX_RETRIES,
-    ConflictError, _python_to_dynamodb, _dynamodb_to_python, utc_tz,
+    ConflictError, _python_to_dynamodb, _dynamodb_to_python, UTC, utc_tz,
     SchemaError, MAGIC_KEY, OverwriteError, InvalidRegionError,)
 from boto.exception import DynamoDBResponseError
 from boto.dynamodb.exceptions import DynamoDBConditionalCheckFailedError
     }
 
 
+class TestUTC(unittest.TestCase):
+    def test_utcoffset(self):
+        self.assertEqual(datetime.timedelta(0), UTC().utcoffset(None))
+    def test_tzname(self):
+        self.assertEqual("UTC", UTC().tzname(None))
+    def test_dst(self):
+        self.assertEqual(datetime.timedelta(0), UTC().dst(None))
+
 class TestConnectionBorg(unittest.TestCase):
     def setUp(self):
         ConnectionBorg._shared_state = {