Ask Solem 9 years ago
parent
commit
2208158efb

+ 1 - 1
celery/backends/cassandra.py

@@ -129,7 +129,7 @@ class CassandraBackend(BaseBackend):
 
     def process_cleanup(self):
         if self._connection is not None:
-            self._connection.shutdown() # also shuts down _session
+            self._connection.shutdown()  # also shuts down _session
 
         self._connection = None
         self._session = None

+ 3 - 7
celery/tests/backends/test_cassandra.py

@@ -106,9 +106,8 @@ class test_CassandraBackend(AppCase):
             self.assertIsNone(x._session)
 
     def test_timeouting_cluster(self):
-        """
-        Tests behaviour when Cluster.connect raises cassandra.OperationTimedOut
-        """
+        """Tests behaviour when Cluster.connect raises
+        cassandra.OperationTimedOut."""
         with mock_module(*CASSANDRA_MODULES):
             from celery.backends import cassandra as mod
 
@@ -139,11 +138,8 @@ class test_CassandraBackend(AppCase):
 
             x.process_cleanup()  # should not raise
 
-
     def test_please_free_memory(self):
-        """
-        Ensure that Cluster object IS shut down.
-        """
+        """Ensure that Cluster object IS shut down."""
         with mock_module(*CASSANDRA_MODULES):
             from celery.backends import cassandra as mod
 

+ 1 - 1
celery/tests/worker/test_worker.py

@@ -47,7 +47,7 @@ def mock_event_dispatcher():
 
 
 class PlaceHolder(object):
-        pass
+    pass
 
 
 def find_step(obj, typ):