Skip to content

Commit

Permalink
Merge pull request #199 from ClusterHQ/fix-tests
Browse files Browse the repository at this point in the history
Unbreak tests.
  • Loading branch information
itamarst committed Aug 10, 2015
2 parents c6e0bbe + a721924 commit 705c79b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions eliot/tests/test_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import json as pyjson
from tempfile import mktemp
from time import time
from uuid import UUID

from six import PY3, PY2

Expand Down Expand Up @@ -556,14 +557,16 @@ def test_destinationMultipleExceptionsCaught(self):

def remove(key):
return [message.pop(key) for message in messages[1:]]

# Make sure we have task_level & task_uuid in exception messages.
task_levels = remove(u"task_level")
task_uuids = remove(u"task_uuid")
timestamps = remove(u"timestamp")

self.assertEqual(
(task_levels[1][-1] == task_levels[0][-1] + 1,
task_uuids[0] == task_uuids[1],
abs(timestamps[0] + timestamps[1] - 2 * time()) < 1,
(abs(timestamps[0] + timestamps[1] - 2 * time()) < 1,
task_levels == [[1], [1]],
len([UUID(uuid) for uuid in task_uuids]) == 2,
messages),
(True, True, True,
[message,
Expand Down

0 comments on commit 705c79b

Please sign in to comment.