From b2fa79b8ff4eedecd4d8798fcc515e29c7a11a64 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl>
Date: Wed, 14 Oct 2020 14:46:02 +0200
Subject: [PATCH] remove redundant code from tests

---
 tests/test_clustering/test_a.py          | 18 +++++++++---------
 tests/test_clustering/test_log_frames.py |  4 +---
 tests/test_objects.py                    |  3 ---
 3 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/tests/test_clustering/test_a.py b/tests/test_clustering/test_a.py
index cc2d90d..8145ea1 100644
--- a/tests/test_clustering/test_a.py
+++ b/tests/test_clustering/test_a.py
@@ -138,7 +138,7 @@ class TestA(unittest.TestCase):
         self.assertEquals(p['count'], 2)
 
     def test_message_with_propos_confirm(self):
-        P = {'q': False}
+        p = {'q': False}
 
         def ok(e):
             self.assertIsInstance(e, ReceivedMessage)
@@ -146,7 +146,7 @@ class TestA(unittest.TestCase):
             # bcoz u can compare memoryviews to their providers :D
             self.assertEquals(e.properties.content_type, b'text/plain')
             self.assertEquals(e.properties.content_encoding, b'utf8')
-            P['q'] = True
+            p['q'] = True
 
         con, fut = self.c.consume(Queue(u'hello4', exclusive=True),
                                   on_message=ok, no_ack=True)
@@ -165,10 +165,10 @@ class TestA(unittest.TestCase):
 
         time.sleep(1)
 
-        self.assertTrue(P['q'])
+        self.assertTrue(p['q'])
 
     def test_message_with_propos(self):
-        P = {'q': False}
+        p = {'q': False}
 
         def ok(e):
             self.assertIsInstance(e, ReceivedMessage)
@@ -176,7 +176,7 @@ class TestA(unittest.TestCase):
             # bcoz u can compare memoryviews to their providers :D
             self.assertEquals(e.properties.content_type, b'text/plain')
             self.assertEquals(e.properties.content_encoding, b'utf8')
-            P['q'] = True
+            p['q'] = True
 
         con, fut = self.c.consume(Queue(u'hello5', exclusive=True),
                                   on_message=ok, no_ack=True)
@@ -188,17 +188,17 @@ class TestA(unittest.TestCase):
 
         time.sleep(2)
 
-        self.assertTrue(P['q'])
+        self.assertTrue(p['q'])
 
     def test_send_recv_nonzerolen(self):
         """with callback function"""
 
-        P = {'q': False}
+        p = {'q': False}
 
         def ok(e):
             self.assertIsInstance(e, ReceivedMessage)
             self.assertEquals(e.body, b'hello6')
-            P['q'] = True
+            p['q'] = True
 
         con, fut = self.c.consume(Queue(u'hello6', exclusive=True),
                                   on_message=ok, no_ack=True)
@@ -208,7 +208,7 @@ class TestA(unittest.TestCase):
 
         time.sleep(1)
 
-        self.assertTrue(P['q'])
+        self.assertTrue(p['q'])
 
     def test_send_recv_nonzerolen_memoryview(self):
         """single and multi frame in MEMORYVIEW mode"""
diff --git a/tests/test_clustering/test_log_frames.py b/tests/test_clustering/test_log_frames.py
index 02c4c6c..5a8c6ff 100644
--- a/tests/test_clustering/test_log_frames.py
+++ b/tests/test_clustering/test_log_frames.py
@@ -1,7 +1,5 @@
 # coding=UTF-8
-"""
-Test things
-"""
+
 from __future__ import print_function, absolute_import, division
 
 import logging
diff --git a/tests/test_objects.py b/tests/test_objects.py
index 09bf92b..908c839 100644
--- a/tests/test_objects.py
+++ b/tests/test_objects.py
@@ -1,7 +1,4 @@
 # coding=UTF-8
-"""
-It sounds like a melody
-"""
 from __future__ import print_function, absolute_import, division
 
 import unittest
-- 
GitLab