[Patchew-devel] [PATCH] Fixed the max chars in line

Shubham Jain posted 1 patch 6 years, 3 months ago
Failed in applying to current master (apply log)
tests/test_rest.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
[Patchew-devel] [PATCH] Fixed the max chars in line
Posted by Shubham Jain 6 years, 3 months ago
Wraped long lines (limit to 90 columns) to improve the readability of the code
---
 tests/test_rest.py | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/tests/test_rest.py b/tests/test_rest.py
index 458f54e..79de3fd 100755
--- a/tests/test_rest.py
+++ b/tests/test_rest.py
@@ -219,16 +219,17 @@ class RestTest(PatchewTestCase):
         self.assertEqual(resp.data['count'], 0)
 
     def test_series_delete(self):
-        resp1 = self.apply_and_retrieve('0001-simple-patch.mbox.gz',
-                                       self.p.id, '20160628014747.20971-1-famz@redhat.com')
+        test_message_id = '20160628014747.20971-1-famz@redhat.com'
+        resp1 = self.apply_and_retrieve('0001-simple-patch.mbox.gz',self.p.id, test_message_id)
+        resp_before = self.api_client.get(self.REST_BASE + 'projects/' + str(self.p.id) 
+                                          + '/series/' + test_message_id + '/')
+        resp = self.api_client.delete(self.REST_BASE + 'projects/' + str(self.p.id) 
+                                      + '/series/' + test_message_id + '/')
+        resp_after = self.api_client.get(self.REST_BASE + 'projects/' + str(self.p.id) 
+                                         + '/series/' + test_message_id + '/')
         
-        resp_before = self.api_client.get(self.REST_BASE + 'projects/' + str(self.p.id) + '/series/20160628014747.20971-1-famz@redhat.com/')
         self.assertEqual(resp_before.status_code, 200)
-
-        resp = self.api_client.delete(self.REST_BASE + 'projects/' + str(self.p.id) + '/series/20160628014747.20971-1-famz@redhat.com/')
         self.assertEqual(resp.status_code, 204)
-
-        resp_after = self.api_client.get(self.REST_BASE + 'projects/' + str(self.p.id) + '/series/20160628014747.20971-1-famz@redhat.com/')
         self.assertEqual(resp_after.status_code, 404)
 
     def test_message(self):
-- 
2.14.3 (Apple Git-98)

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel