[PATCH 26/46] tests: Fix the submitter completion tests

Damien Lespiau damien.lespiau at intel.com
Sun Nov 9 06:08:44 AEDT 2014


Because we've changed the format of the json file we return to be a
"proper" object rather than the db dump django does by default, there's
no 'fields' sub-object anymore.

Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
 apps/patchwork/tests/test_person.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/patchwork/tests/test_person.py b/apps/patchwork/tests/test_person.py
index d948096..5ce8713 100644
--- a/apps/patchwork/tests/test_person.py
+++ b/apps/patchwork/tests/test_person.py
@@ -36,14 +36,14 @@ class SubmitterCompletionTest(TestCase):
         self.assertEquals(response.status_code, 200)
         data = json.loads(response.content)
         self.assertEquals(len(data), 1)
-        self.assertEquals(data[0]['fields']['name'], 'Test Name')
+        self.assertEquals(data[0]['name'], 'Test Name')
 
     def testEmailComplete(self):
         response = self.client.get('/submitter/', {'q': 'test2'})
         self.assertEquals(response.status_code, 200)
         data = json.loads(response.content)
         self.assertEquals(len(data), 1)
-        self.assertEquals(data[0]['fields']['email'], 'test2 at example.com')
+        self.assertEquals(data[0]['email'], 'test2 at example.com')
 
     def testCompleteLimit(self):
         for i in range(3,10):
-- 
1.8.3.1



More information about the Patchwork mailing list