예제 #1
0
 def test_valueerror_when_incomplete_date(self):
     with self.assertRaises(ValueError):
         date(2013, 1)
예제 #2
0
 def test_date_specified_with_just_minutes(self):
     func = date(2013, 1, 2, minute=40)
     d = func()
     self.assert_timestamp_equal(1357087200, d)
예제 #3
0
 def test_date_specified_with_tz_offset(self):
     func = date(2013, 1, 2, 3, 4, 5, 6, tz='Asia/Kuwait')
     d = func()
     self.assert_timestamp_equal(1357085045, d)
예제 #4
0
 def test_date_now(self):
     func = date()
     d = func()
     self.assert_timestamp_equal(1326511294, d)
예제 #5
0
 def test_date_specified(self):
     func = date(2013, 1, 2, 3, 4, 5, 6)
     d = func()
     self.assert_timestamp_equal(1357095845, d)
예제 #6
0
 def test_valueerror_when_incomplete_date(self):
     with self.assertRaises(ValueError):
         date(2013, 1)
예제 #7
0
 def test_date_specified_with_tz_offset(self):
     func = date(2013, 1, 2, 3, 4, 5, 6, tz='Asia/Kuwait')
     d = func()
     self.assert_timestamp_equal(1357085045, d)
예제 #8
0
 def test_date_specified_with_just_minutes(self):
     func = date(2013, 1, 2, minute=40)
     d = func()
     self.assert_timestamp_equal(1357087200, d)
예제 #9
0
 def test_date_specified(self):
     func = date(2013, 1, 2, 3, 4, 5, 6)
     d = func()
     self.assert_timestamp_equal(1357095845, d)
예제 #10
0
 def test_date_now(self):
     func = date()
     d = func()
     self.assert_timestamp_equal(1326511294, d)