Index: /main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/customers/customer.py
===================================================================
--- /main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/customers/customer.py	(revision 12738)
+++ /main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/customers/customer.py	(revision 12739)
@@ -26,9 +26,8 @@
 from zope.password.interfaces import IPasswordManager
 from zope.catalog.interfaces import ICatalog
-from zope.component import getUtility, createObject, queryUtility
+from zope.component import getUtility, queryUtility
 from zope.component.interfaces import IFactory
 from zope.interface import implementedBy
 from zope.securitypolicy.interfaces import IPrincipalRoleManager
-from zope.schema.interfaces import ConstraintNotSatisfied
 
 from waeup.ikoba.image import IkobaImageFile
@@ -36,6 +35,5 @@
 from waeup.ikoba.interfaces import (
     IObjectHistory, IUserAccount, IFileStoreNameChooser, IFileStoreHandler,
-    IIkobaUtils, IExtFileStore,
-    CREATED, REQUESTED, APPROVED)
+    IIkobaUtils, IExtFileStore, )
 from waeup.ikoba.customers.interfaces import (
     ICustomer, ICustomerNavigation, ICSVCustomerExporter,
@@ -45,5 +43,7 @@
 from waeup.ikoba.customers.contracts import ContractsContainer
 from waeup.ikoba.payments.interfaces import IPayer, IPayerFinder
-from waeup.ikoba.utils.helpers import attrs_to_fields, now, copy_filesystem_tree
+from waeup.ikoba.utils.helpers import (
+    attrs_to_fields, now, copy_filesystem_tree)
+
 
 class Customer(grok.Container):
@@ -79,5 +79,6 @@
             'password'] = passwordmanager.encodePassword(password)
         self.temp_password['user'] = user
-        self.temp_password['timestamp'] = datetime.utcnow()  # offset-naive datetime
+        self.temp_password[
+            'timestamp'] = datetime.utcnow()  # offset-naive datetime
 
     def getTempPassword(self):
@@ -91,6 +92,6 @@
         if temp_password_dict is not None:
             delta = timedelta(minutes=self.temp_password_minutes)
-            now = datetime.utcnow()
-            if now < temp_password_dict.get('timestamp') + delta:
+            dt_now = datetime.utcnow()
+            if dt_now < temp_password_dict.get('timestamp') + delta:
                 return temp_password_dict.get('password')
             else:
@@ -100,5 +101,6 @@
 
     def writeLogMessage(self, view, message):
-        ob_class = view.__implemented__.__name__.replace('waeup.ikoba.','')
+        ob_class = view.__implemented__.__name__.replace(
+            'waeup.ikoba.', '')
         self.__parent__.logger.info(
             '%s - %s - %s' % (ob_class, self.__name__, message))
@@ -198,4 +200,5 @@
     return
 
+
 def move_customer_files(customer, del_dir):
     """Move files belonging to `customer` to `del_dir`.
@@ -248,5 +251,5 @@
         timestamp = str(now().replace(microsecond=0))  # store UTC timestamp
         for num, row in enumerate(csv_data[1:-1]):
-            csv_data[num+1] = csv_data[num+1] + ',' + timestamp
+            csv_data[num + 1] = csv_data[num + 1] + ',' + timestamp
         csv_path = os.path.join(del_dir, '%s.csv' % name)
 
Index: /main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/customers/tests/test_customer.py
===================================================================
--- /main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/customers/tests/test_customer.py	(revision 12738)
+++ /main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/customers/tests/test_customer.py	(revision 12739)
@@ -21,16 +21,9 @@
 import re
 import unittest
-import grok
 from cStringIO import StringIO
-from datetime import tzinfo
-from zope.component import (
-    getUtility, queryUtility, createObject, getUtilitiesFor,
-    )
+from zope.component import getUtility, getUtilitiesFor
 from zope.component.hooks import setSite
-from zope.catalog.interfaces import ICatalog
 from zope.component.interfaces import IFactory
-from zope.event import notify
 from zope.interface import verify
-from zope.schema.interfaces import RequiredMissing
 from waeup.ikoba.interfaces import IExtFileStore, IFileStoreNameChooser
 from waeup.ikoba.app import Company
@@ -45,4 +38,5 @@
 from waeup.ikoba.testing import FunctionalLayer, FunctionalTestCase
 
+
 class HelperTests(unittest.TestCase):
     # Tests for helper functions in customer module.
@@ -66,4 +60,5 @@
             path_from_custid('KM123456'), u'00120/KM123456')
         return
+
 
 class CustomerTest(FunctionalTestCase):
@@ -257,4 +252,5 @@
         return
 
+
 class CustomerFactoryTest(FunctionalTestCase):
 
