Skip to content

Commit 705c79b

Browse files
committed
Merge pull request #199 from ClusterHQ/fix-tests
Unbreak tests.
2 parents c6e0bbe + a721924 commit 705c79b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

eliot/tests/test_output.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import json as pyjson
1212
from tempfile import mktemp
1313
from time import time
14+
from uuid import UUID
1415

1516
from six import PY3, PY2
1617

@@ -556,14 +557,16 @@ def test_destinationMultipleExceptionsCaught(self):
556557

557558
def remove(key):
558559
return [message.pop(key) for message in messages[1:]]
560+
561+
# Make sure we have task_level & task_uuid in exception messages.
559562
task_levels = remove(u"task_level")
560563
task_uuids = remove(u"task_uuid")
561564
timestamps = remove(u"timestamp")
562565

563566
self.assertEqual(
564-
(task_levels[1][-1] == task_levels[0][-1] + 1,
565-
task_uuids[0] == task_uuids[1],
566-
abs(timestamps[0] + timestamps[1] - 2 * time()) < 1,
567+
(abs(timestamps[0] + timestamps[1] - 2 * time()) < 1,
568+
task_levels == [[1], [1]],
569+
len([UUID(uuid) for uuid in task_uuids]) == 2,
567570
messages),
568571
(True, True, True,
569572
[message,

0 commit comments

Comments
 (0)