summaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2013-09-11 10:37:48 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2013-09-11 16:54:59 +0900
commitb9aaf8e51a074724347d3cfb69b351918bae4b98 (patch)
treea42fc15518000dc876da8d3e1e443608a4e0def9 /testdata
parentb1adb9b986f6f1b1c27cb103efbe7fa6e62ac5ef (diff)
downloadpygerrit-b9aaf8e51a074724347d3cfb69b351918bae4b98.tar.gz
Fix #5: Move json parsing and error handling into the event factory
Pass the raw string into the event factory and parse it to a json object there. If the string is not valid json, generate an error event. Add a unit test for handling of invalid json on the event stream. Change-Id: I209a89fd28c3a594b71443fc106e25d58c5cc1ea
Diffstat (limited to 'testdata')
-rw-r--r--testdata/invalid-json.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/testdata/invalid-json.txt b/testdata/invalid-json.txt
new file mode 100644
index 0000000..f7a60bb
--- /dev/null
+++ b/testdata/invalid-json.txt
@@ -0,0 +1,4 @@
+)]}'
+{"type":"user-defined-event",
+ "title":"Event title",
+ "description":"Event description"}