Commit 9a853f39 authored by Samuel GAIST's avatar Samuel GAIST

[test][worker] Import simplejson as json to make it easy to swap

parent e56b22e3
......@@ -39,7 +39,7 @@
import os
import logging
import unittest
import simplejson
import simplejson as json
import multiprocessing
import queue
......@@ -394,7 +394,7 @@ class TestOneWorker(TestWorkerBase):
self.assertEqual(status, WorkerController.DONE)
self.assertEqual(job_id, expected_job_id)
result = simplejson.loads(data[0])
result = json.loads(data[0])
self.assertEqual(result["status"], 0)
......@@ -419,7 +419,7 @@ class TestOneWorker(TestWorkerBase):
self.assertEqual(status, WorkerController.JOB_ERROR)
self.assertEqual(job_id, 1)
result = simplejson.loads(data[0])
result = json.loads(data[0])
self.assertEqual(result["status"], 1)
self.assertTrue("a = b" in result["user_error"])
......@@ -534,7 +534,7 @@ class TestTwoWorkers(TestWorkerBase):
self.assertEqual(status, WorkerController.DONE)
self.assertEqual(job_id, 1)
result = simplejson.loads(data[0])
result = json.loads(data[0])
self.assertEqual(result["status"], 0)
......@@ -554,7 +554,7 @@ class TestTwoWorkers(TestWorkerBase):
self.assertEqual(worker, WORKER2)
self.assertEqual(job_id, 2)
result = simplejson.loads(data[0])
result = json.loads(data[0])
self.assertEqual(result["status"], 0)
self.controller.execute(WORKER1, 1, CONFIGURATION1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment