Exemplo n.º 1
0
 def test_start(self):
     profile = ProfilingRecord().start()
     self.assertIsNotNone(profile.start_ts)
     self.assertIsNone(profile.end_ts)
     self.assertIsNone(profile.duration)
     # now check again to see that end and duration are cleared
     profile.end_ts = datetime.datetime.utcnow()
     profile.duration = 1
     profile.start()
     self.assertIsNotNone(profile.start_ts)
     self.assertIsNone(profile.end_ts)
     self.assertIsNone(profile.duration)
Exemplo n.º 2
0
 def test_start(self):
     profile = ProfilingRecord().start()
     self.assertIsNotNone(profile.start_ts)
     self.assertIsNone(profile.end_ts)
     self.assertIsNone(profile.duration)
     # now check again to see that end and duration are cleared
     profile.end_ts = datetime.datetime.utcnow()
     profile.duration = 1
     profile.start()
     self.assertIsNotNone(profile.start_ts)
     self.assertIsNone(profile.end_ts)
     self.assertIsNone(profile.duration)