def setUp(self):
super(TestCase, self).setUp()
# We use Yakutsk, Russia timezone to check if they convert right
# with the local one
self.other_timezone = pytz.timezone('Asia/Yakutsk')
if get_localzone() == self.other_timezone:
self.other_timezone = pytz.timezone('Europe/Vienna')
self.client = Client(None, 'http://localhost').rest_client
self.client.timezone = self.other_timezone
self.a_date = datetime.datetime(
1986, 3, 6, 10, 28, 47,
tzinfo=pytz.UTC,
).astimezone(pytz.timezone('Europe/Vienna'))\
.astimezone(get_localzone())
self.a_uuid = uuid.uuid1()
评论列表
文章目录