summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/toastergui/tests.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/bitbake/lib/toaster/toastergui/tests.py b/bitbake/lib/toaster/toastergui/tests.py
index 1ed83dceda..723348dd57 100644
--- a/bitbake/lib/toaster/toastergui/tests.py
+++ b/bitbake/lib/toaster/toastergui/tests.py
@@ -82,10 +82,7 @@ class ViewTests(TestCase):
82 self.assertEqual(response.status_code, 200) 82 self.assertEqual(response.status_code, 200)
83 self.assertTrue(response['Content-Type'].startswith('application/json')) 83 self.assertTrue(response['Content-Type'].startswith('application/json'))
84 84
85 try: 85 data = json.loads(response.content)
86 data = json.loads(response.content)
87 except:
88 self.fail("Response %s is not json-loadable" % response.content)
89 86
90 self.assertTrue("error" in data) 87 self.assertTrue("error" in data)
91 self.assertEqual(data["error"], "ok") 88 self.assertEqual(data["error"], "ok")
@@ -113,10 +110,8 @@ class ViewTests(TestCase):
113 self.assertEqual(response.status_code, 200) 110 self.assertEqual(response.status_code, 200)
114 self.assertTrue(response['Content-Type'].startswith('application/json')) 111 self.assertTrue(response['Content-Type'].startswith('application/json'))
115 112
116 try: 113 data = json.loads(response.content)
117 data = json.loads(response.content) 114
118 except:
119 self.fail("Response %s is not json-loadable" % response.content)
120 self.assertTrue("error" in data) 115 self.assertTrue("error" in data)
121 self.assertEqual(data["error"], "ok") 116 self.assertEqual(data["error"], "ok")
122 self.assertTrue("results" in data) 117 self.assertTrue("results" in data)