refactor failure inject
[doctor.git] / tests / consumer / sample.py
index a698623..20ad9d5 100644 (file)
@@ -55,9 +55,9 @@ class ConsumerApp(Thread):
         @app.route('/failure', methods=['POST'])
         def event_posted():
             self.log.info('doctor consumer notified at %s' % time.time())
-            self.log.info('received data = %s' % request.data)
-            data = json.loads(request.data)
-            return "OK"
+            self.log.info('sample consumer received data = %s' % request.data)
+            data = json.loads(request.data.decode('utf8'))
+            return 'OK'
 
         @app.route('/shutdown', methods=['POST'])
         def shutdown():