mirror of
https://github.com/django/django.git
synced 2024-11-18 23:44:22 +00:00
60e38d29ca
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
19 lines
803 B
Python
19 lines
803 B
Python
from django.test import TestCase
|
|
|
|
from django.utils.tzinfo import FixedOffset
|
|
|
|
class TzinfoTests(TestCase):
|
|
|
|
def test_fixedoffset(self):
|
|
self.assertEquals(repr(FixedOffset(0)), '+0000')
|
|
self.assertEquals(repr(FixedOffset(60)), '+0100')
|
|
self.assertEquals(repr(FixedOffset(-60)), '-0100')
|
|
self.assertEquals(repr(FixedOffset(280)), '+0440')
|
|
self.assertEquals(repr(FixedOffset(-280)), '-0440')
|
|
self.assertEquals(repr(FixedOffset(-78.4)), '-0118')
|
|
self.assertEquals(repr(FixedOffset(78.4)), '+0118')
|
|
self.assertEquals(repr(FixedOffset(-5.5*60)), '-0530')
|
|
self.assertEquals(repr(FixedOffset(5.5*60)), '+0530')
|
|
self.assertEquals(repr(FixedOffset(-.5*60)), '-0030')
|
|
self.assertEquals(repr(FixedOffset(.5*60)), '+0030')
|