Skip to content

Commit

Permalink
fix: first seen was after last seen, trigerring the exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Jan 29, 2020
1 parent 7e29d41 commit db9c54b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_mispevent.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,10 @@ def test_first_last_seen(self):
me.add_attribute('ip-dst', '8.8.8.8', first_seen='06-21-1998', last_seen=1580213607.469571)
self.assertEqual(me.attributes[0].first_seen.year, 1998)
self.assertEqual(me.attributes[0].last_seen.year, 2020)
today = date.today()
me.attributes[0].first_seen = today
now = datetime.now().astimezone()
me.attributes[0].last_seen = now
today = date.today()
me.attributes[0].first_seen = today
self.assertEqual(me.attributes[0].first_seen.year, today.year)
self.assertEqual(me.attributes[0].last_seen, now)

Expand Down

0 comments on commit db9c54b

Please sign in to comment.