def testGetElapsedSecondsNoStartEndTimes(self):
     task_output = FlakeSwarmingTaskOutput(completed_time=None,
                                           error=None,
                                           iterations=50,
                                           pass_count=25,
                                           started_time=None,
                                           task_id='task_id')
     self.assertIsNone(task_output.GetElapsedSeconds())
 def testGetElapsedSeconds(self):
     task_output = FlakeSwarmingTaskOutput(
         completed_time=datetime(2018, 2, 21, 0, 1, 0),
         error=None,
         iterations=50,
         pass_count=25,
         started_time=datetime(2018, 2, 21, 0, 0, 0),
         task_id='task_id')
     self.assertEqual(60, task_output.GetElapsedSeconds())