tests: Ensure LogLine gets the right json type
This commit is contained in:
parent
0f79027a0e
commit
a49c524b00
@ -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']
|
||||
|
Loading…
Reference in New Issue
Block a user