From a49c524b00ad2b8543e402d741dedebc12f9472c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 3 Aug 2016 09:06:07 +0200 Subject: [PATCH] tests: Ensure LogLine gets the right json type --- tests/end2end/fixtures/quteprocess.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/end2end/fixtures/quteprocess.py b/tests/end2end/fixtures/quteprocess.py index 569e34c52..49fd9f27c 100644 --- a/tests/end2end/fixtures/quteprocess.py +++ b/tests/end2end/fixtures/quteprocess.py @@ -73,6 +73,8 @@ class LogLine(testprocess.Line): line = json.loads(data) except ValueError: raise testprocess.InvalidLine(data) + if not isinstance(line, dict): + raise testprocess.InvalidLine(data) self.timestamp = datetime.datetime.fromtimestamp(line['created']) self.loglevel = line['levelno']