Beispiel #1
0
 def test(self):
     incident = Incident()
     assert incident.current_end_date == timezone.now()
     incident.date_closed = timezone.now() - timedelta(minutes=10)
     assert incident.current_end_date == timezone.now() - timedelta(
         minutes=10)
Beispiel #2
0
 def test(self):
     incident = Incident()
     assert incident.current_end_date == timezone.now()
     incident.date_closed = timezone.now() - timedelta(minutes=10)
     assert incident.current_end_date == timezone.now() - timedelta(minutes=10)
Beispiel #3
0
 def test(self):
     incident = Incident(date_started=timezone.now() - timedelta(minutes=5))
     assert incident.duration == timedelta(minutes=5)
     incident.date_closed = incident.date_started + timedelta(minutes=2)
     assert incident.duration == timedelta(minutes=2)
Beispiel #4
0
 def test(self):
     incident = Incident(date_started=timezone.now() - timedelta(minutes=5))
     assert incident.duration == timedelta(minutes=5)
     incident.date_closed = incident.date_started + timedelta(minutes=2)
     assert incident.duration == timedelta(minutes=2)