diff --git a/unittests/test_concrete_property.py b/unittests/test_concrete_property.py
index 6a55dcf99c258b4c0eb000588e7fea7eb4a4c68f..32d38bbed553b6b1d162f7e76fb271de38e08b95 100644
--- a/unittests/test_concrete_property.py
+++ b/unittests/test_concrete_property.py
@@ -27,18 +27,21 @@
 from linkahead import configure_connection
 from linkahead.common.models import _ConcreteProperty
 from linkahead.connection.mockup import MockUpServerConnection
+from pytest import raises
 # pylint: disable=missing-docstring
-def eq(a,b):
+
+
+def eq(a, b):
     assert a == b
 
+
 def there(a):
     assert a is not None
 
+
 def tru(a):
     assert a
 
-from pytest import raises
-
 
 def setup_module():
     there(_ConcreteProperty)
diff --git a/unittests/test_connection.py b/unittests/test_connection.py
index a4903fb3a4f7d12d7b87a5a30cbf643e48d5fe23..a3a1eff705c64f59baec33088906bdd9a4daa14d 100644
--- a/unittests/test_connection.py
+++ b/unittests/test_connection.py
@@ -39,19 +39,20 @@ from linkahead.connection.mockup import (MockUpResponse, MockUpServerConnection,
 from linkahead.connection.utils import make_uri_path, quote, urlencode
 from linkahead.exceptions import (ConfigurationError, LoginFailedError,
                                   LinkAheadConnectionError)
+from pytest import raises
 
 
-def eq(a,b):
+def eq(a, b):
     assert a == b
 
+
 def there(a):
     assert a is not None
 
+
 def tru(a):
     assert a
 
-from pytest import raises
-
 
 def setup_function(function):
     configure_connection(url="http://localhost:8888/some/path",
@@ -144,10 +145,9 @@ def test_configure_connection_bad_url():
 
 
 def test_connection_interface():
-    
     with raises(TypeError) as cm:
         CaosDBServerConnection()
-    
+
     assert "Can't instantiate abstract class CaosDBServerConnection" in str(cm.value)
 
     tru(hasattr(CaosDBServerConnection, "request"))
diff --git a/unittests/test_connection_utils.py b/unittests/test_connection_utils.py
index 4f114783eebed88ac3d4755ff3dc224b6c5feed3..d82cfde07150fa3dd480cfcdd0ae63fd25fdad24 100644
--- a/unittests/test_connection_utils.py
+++ b/unittests/test_connection_utils.py
@@ -26,17 +26,6 @@
 from __future__ import unicode_literals, print_function
 from pytest import raises
 
-def eq(a,b):
-    assert a == b
-
-def there(a):
-    assert a is not None
-
-def tru(a):
-    assert a
-
-from pytest import raises
-
 from linkahead.exceptions import ConfigurationError, LoginFailedError
 from linkahead.connection.utils import parse_auth_token, auth_token_to_cookie
 from linkahead.connection.connection import (
@@ -49,6 +38,18 @@ from linkahead.connection.authentication.interface import CredentialsAuthenticat
 from linkahead import execute_query
 
 
+def eq(a, b):
+    assert a == b
+
+
+def there(a):
+    assert a is not None
+
+
+def tru(a):
+    assert a
+
+
 def setup_module():
     _reset_config()
 
diff --git a/unittests/test_exception.py b/unittests/test_exception.py
index 23628bfdf761542e4d463c354e008826d6cb95d3..1e54edbeec4551712a90115e18b5437398657861 100644
--- a/unittests/test_exception.py
+++ b/unittests/test_exception.py
@@ -22,7 +22,7 @@
 import warnings
 
 from linkahead.exceptions import (CaosDBConnectionError, CaosDBException,
-                               LinkAheadConnectionError, LinkAheadException)
+                                  LinkAheadConnectionError, LinkAheadException)
 
 # make sure the deprecation is raised
 with warnings.catch_warnings(record=True) as w:
diff --git a/unittests/test_high_level_api.py b/unittests/test_high_level_api.py
index a47c21eb3999707a23efe362dfafc16f33b8c9fb..be57e3c747619852c7cec2002eac6928c7d77702 100644
--- a/unittests/test_high_level_api.py
+++ b/unittests/test_high_level_api.py
@@ -25,19 +25,19 @@
 
 import linkahead as db
 from linkahead.high_level_api import (convert_to_entity, convert_to_python_object,
-                                   new_high_level_entity)
+                                      new_high_level_entity)
 from linkahead.high_level_api import (CaosDBPythonUnresolvedParent,
-                                   CaosDBPythonUnresolvedReference,
-                                   CaosDBPythonRecord, CaosDBPythonFile,
-                                   high_level_type_for_standard_type,
-                                   standard_type_for_high_level_type,
-                                   high_level_type_for_role,
-                                   CaosDBPythonEntity)
+                                      CaosDBPythonUnresolvedReference,
+                                      CaosDBPythonRecord, CaosDBPythonFile,
+                                      high_level_type_for_standard_type,
+                                      standard_type_for_high_level_type,
+                                      high_level_type_for_role,
+                                      CaosDBPythonEntity)
 from linkahead.apiutils import compare_entities
 
 from linkahead.common.datatype import (is_list_datatype,
-                                    get_list_datatype,
-                                    is_reference)
+                                       get_list_datatype,
+                                       is_reference)
 
 import pytest
 from lxml import etree
diff --git a/unittests/test_record_type.py b/unittests/test_record_type.py
index 87a3d22964d1e452fe74f2f5c19edb149382162a..8741950a31c89088f5b96003d363d5e3db030852 100644
--- a/unittests/test_record_type.py
+++ b/unittests/test_record_type.py
@@ -26,6 +26,7 @@ from linkahead import Entity, RecordType, configure_connection
 from linkahead.connection.mockup import MockUpServerConnection
 # pylint: disable=missing-docstring
 
+
 def setup_module():
     assert RecordType is not None
     configure_connection(url="unittests", username="testuser",