def test_valueerror_when_incomplete_date(self): with self.assertRaises(ValueError): date(2013, 1)
def test_date_specified_with_just_minutes(self): func = date(2013, 1, 2, minute=40) d = func() self.assert_timestamp_equal(1357087200, d)
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)
def test_date_now(self): func = date() d = func() self.assert_timestamp_equal(1326511294, d)
def test_date_specified(self): func = date(2013, 1, 2, 3, 4, 5, 6) d = func() self.assert_timestamp_equal(1357095845, d)