本文整理汇总了Python中manila.utils.last_completed_audit_period函数的典型用法代码示例。如果您正苦于以下问题:Python last_completed_audit_period函数的具体用法?Python last_completed_audit_period怎么用?Python last_completed_audit_period使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了last_completed_audit_period函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_year_with_offset_after_current
def test_year_with_offset_after_current(self):
begin, end = utils.last_completed_audit_period(unit='[email protected]')
self.assertEqual(begin, datetime.datetime(day=1,
month=6,
year=2010))
self.assertEqual(end, datetime.datetime(day=1,
month=6,
year=2011))
示例2: test_month_with_offset_after_current
def test_month_with_offset_after_current(self):
begin, end = utils.last_completed_audit_period(unit='[email protected]')
self.assertEqual(begin, datetime.datetime(day=15,
month=1,
year=2012))
self.assertEqual(end, datetime.datetime(day=15,
month=2,
year=2012))
示例3: test_year
def test_year(self):
begin, end = utils.last_completed_audit_period(unit='year')
self.assertEqual(begin, datetime.datetime(day=1,
month=1,
year=2011))
self.assertEqual(end, datetime.datetime(day=1,
month=1,
year=2012))
示例4: test_day
def test_day(self):
begin, end = utils.last_completed_audit_period(unit='day')
self.assertEqual(begin, datetime.datetime(day=4,
month=3,
year=2012))
self.assertEqual(end, datetime.datetime(day=5,
month=3,
year=2012))
示例5: test_year_with_offset_before_current
def test_year_with_offset_before_current(self):
begin, end = utils.last_completed_audit_period(unit='[email protected]')
self.assertEquals(begin, datetime.datetime(day=1,
month=2,
year=2011))
self.assertEquals(end, datetime.datetime(day=1,
month=2,
year=2012))
示例6: test_month
def test_month(self):
begin, end = utils.last_completed_audit_period(unit='month')
self.assertEquals(begin, datetime.datetime(day=1,
month=2,
year=2012))
self.assertEquals(end, datetime.datetime(day=1,
month=3,
year=2012))
示例7: test_day_with_offset_after_current
def test_day_with_offset_after_current(self):
begin, end = utils.last_completed_audit_period(unit='[email protected]')
self.assertEqual(begin, datetime.datetime(hour=10,
day=3,
month=3,
year=2012))
self.assertEqual(end, datetime.datetime(hour=10,
day=4,
month=3,
year=2012))
示例8: test_day_with_offset_before_current
def test_day_with_offset_before_current(self):
begin, end = utils.last_completed_audit_period(unit='[email protected]')
self.assertEquals(begin, datetime.datetime(hour=6,
day=4,
month=3,
year=2012))
self.assertEquals(end, datetime.datetime(hour=6,
day=5,
month=3,
year=2012))
示例9: test_hour
def test_hour(self):
begin, end = utils.last_completed_audit_period(unit='hour')
self.assertEqual(begin,
datetime.datetime(hour=7,
day=5,
month=3,
year=2012))
self.assertEqual(end, datetime.datetime(hour=8,
day=5,
month=3,
year=2012))
示例10: test_hour_with_offset_after_current
def test_hour_with_offset_after_current(self):
begin, end = utils.last_completed_audit_period(unit='[email protected]')
self.assertEqual(begin, datetime.datetime(minute=30,
hour=6,
day=5,
month=3,
year=2012))
self.assertEqual(end, datetime.datetime(minute=30,
hour=7,
day=5,
month=3,
year=2012))