mirror of
https://github.com/django/django.git
synced 2024-12-27 19:46:22 +00:00
afd040d4d3
assert_ -> assertTrue assertEquals -> assertEqual failUnless -> assertTrue For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
19 lines
784 B
Python
19 lines
784 B
Python
import unittest
|
|
|
|
from django.utils.tzinfo import FixedOffset
|
|
|
|
class TzinfoTests(unittest.TestCase):
|
|
|
|
def test_fixedoffset(self):
|
|
self.assertEqual(repr(FixedOffset(0)), '+0000')
|
|
self.assertEqual(repr(FixedOffset(60)), '+0100')
|
|
self.assertEqual(repr(FixedOffset(-60)), '-0100')
|
|
self.assertEqual(repr(FixedOffset(280)), '+0440')
|
|
self.assertEqual(repr(FixedOffset(-280)), '-0440')
|
|
self.assertEqual(repr(FixedOffset(-78.4)), '-0118')
|
|
self.assertEqual(repr(FixedOffset(78.4)), '+0118')
|
|
self.assertEqual(repr(FixedOffset(-5.5*60)), '-0530')
|
|
self.assertEqual(repr(FixedOffset(5.5*60)), '+0530')
|
|
self.assertEqual(repr(FixedOffset(-.5*60)), '-0030')
|
|
self.assertEqual(repr(FixedOffset(.5*60)), '+0030')
|