示例#1
0
 def test_write_scheduled_downtime_table(self):
     sd = (45, 7, "general maintanence")
     result = tbls.write_scheduled_downtime(sd, 1000)
     sched_down = tbls.create_scheduled_downtime(self.metadata)
     self.check_ordered_dict_to_table(result, sched_down)
     self.assertEqual(result['night'], sd[0])
     self.assertEqual(result['Session_sessionId'], 1000)
     self.assertEqual(result['duration'], sd[1])
     self.assertEqual(result['activity'], sd[2])
示例#2
0
 def test_create_scheduled_downtime_table(self):
     sched_down = tbls.create_scheduled_downtime(self.metadata)
     self.assertEqual(len(sched_down.c), 4)
     self.assertEqual(len(sched_down.indexes), 1)