[damned-lies] Removed unneeded parens in api tests



commit fb744843f32aa2d8c191188ffbddc0ad3e315699
Author: Claude Paroz <claude 2xlibre net>
Date:   Thu Jul 29 09:41:26 2021 +0200

    Removed unneeded parens in api tests

 api/tests.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/api/tests.py b/api/tests.py
index e38a1e8e..6d4f6e94 100644
--- a/api/tests.py
+++ b/api/tests.py
@@ -143,17 +143,17 @@ class APITests(TestCase):
         url = reverse('api-upload', args=['gnome-hello', 'master', 'po', 'fr'])
         test_po = Path(__file__).parent.parent / "stats" / "tests" / "test.po"
         # Test anonymous cannot post
-        with (test_po).open('rb') as fh:
+        with test_po.open('rb') as fh:
             response = self.client.post(url, data={'file': File(fh)})
             self.assertRedirects(response, reverse('login') + f'?next={url}')
 
         self.client.force_login(translator)
-        with (test_po).open('rb') as fh:
+        with test_po.open('rb') as fh:
             response = self.client.post(url, data={'file': File(fh)})
             self.assertEqual(response.status_code, 403)
 
         state.change_state(StateTranslating, person=translator)
-        with (test_po).open('rb') as fh:
+        with test_po.open('rb') as fh:
             response = self.client.post(url, data={'file': File(fh)})
         self.assertEqual(response.json(), {'result': 'OK'})
         self.assertEqual(len(mail.outbox), 1)
@@ -161,7 +161,7 @@ class APITests(TestCase):
 
         # Test upload with comment
         state.change_state(StateTranslating, person=translator)
-        with (test_po).open('rb') as fh:
+        with test_po.open('rb') as fh:
             data = {
                 'file': File(fh),
                 'comment': 'The comment',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]