Changeset 12775


Ignore:
Timestamp:
16 Mar 2015, 12:53:09 (10 years ago)
Author:
uli
Message:

pep8, pyflakes.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba/payments
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/payments/browser.py

    r12767 r12775  
    2323from waeup.ikoba.interfaces import MessageFactory as _
    2424from waeup.ikoba.browser.viewlets import PrimaryNavTab, ManageActionButton
    25 from waeup.ikoba.browser.layout import (
    26     IkobaPage, IkobaEditFormPage, IkobaDisplayFormPage,
    27     NullValidator, jsaction, action, UtilityView)
    28 from waeup.ikoba.utils.helpers import get_current_principal
    29 
     25from waeup.ikoba.browser.layout import IkobaPage
    3026from waeup.ikoba.payments.interfaces import (
    3127    IPaymentsContainer, IPayment, payment_states
     
    192188            self.flash(_('Successfully removed: ${a}',
    193189                mapping={'a': ','.join(deleted)}))
    194             ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','')
     190            ob_class = self.__implemented__.__name__.replace(
     191                'waeup.ikoba.', '')
    195192            self.context.logger.info(
    196193                '%s - removed: %s' % (ob_class, ','.join(deleted)))
  • main/waeup.ikoba/trunk/src/waeup/ikoba/payments/catalog.py

    r12762 r12775  
    1919"""
    2020import grok
    21 from hurry.query import Eq, Text
     21from hurry.query import Eq
    2222from hurry.query.query import Query
    2323from zope.catalog.interfaces import ICatalog
  • main/waeup.ikoba/trunk/src/waeup/ikoba/payments/container.py

    r12766 r12775  
    4545        raise NotImplementedError()
    4646
     47
    4748PaymentsContainer = attrs_to_fields(PaymentsContainer)
     49
    4850
    4951class PaymentsPlugin(grok.GlobalUtility):
  • main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_browser.py

    r12767 r12775  
    11## $Id: test_browser.py 12762 2015-03-14 13:49:29Z henrik $
    2 ## 
     2##
    33## Copyright (C) 2015 Uli Fouquet & Henrik Bettermann
    44## This program is free software; you can redistribute it and/or modify
     
    66## the Free Software Foundation; either version 2 of the License, or
    77## (at your option) any later version.
    8 ## 
     8##
    99## This program is distributed in the hope that it will be useful,
    1010## but WITHOUT ANY WARRANTY; without even the implied warranty of
    1111## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1212## GNU General Public License for more details.
    13 ## 
     13##
    1414## You should have received a copy of the GNU General Public License
    1515## along with this program; if not, write to the Free Software
     
    2222import os
    2323from decimal import Decimal
    24 from waeup.ikoba.testing import FunctionalLayer, FunctionalTestCase
     24from waeup.ikoba.testing import FunctionalLayer
    2525from waeup.ikoba.payments.payment import Payment
    2626from waeup.ikoba.payments.interfaces import IPayer, IPayable
    27 from waeup.ikoba.browser.tests.test_pdf import samples_dir
    2827from waeup.ikoba.products.productoptions import ProductOption
    2928from waeup.ikoba.customers.tests.test_browser import CustomersFullSetup
     
    6766        self.assertTrue('Empty search string' in self.browser.contents)
    6867        self.browser.getControl(name="searchtype").value = ['payment_id']
    69         self.browser.getControl(name="searchterm").value = self.payment.payment_id
     68        self.browser.getControl(
     69            name="searchterm").value = self.payment.payment_id
    7070        self.browser.getControl("Find payment(s)").click()
    7171        self.assertTrue(
     
    8282        logcontent = open(logfile).read()
    8383        self.assertTrue(
    84             'INFO - zope.mgr - payments.browser.PaymentsContainerManagePage - removed: %s'
     84            ('INFO - zope.mgr - payments.browser.'
     85             'PaymentsContainerManagePage - removed: %s')
    8586            % self.payment.payment_id in logcontent)
  • main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_payment.py

    r12774 r12775  
    155155
    156156    def test_get_payments_from_payer_id(self):
    157         # we can lookup payments.
     157        # we can lookup payments from payer ids.
    158158        self.getRootFolder()['app'] = Company()
    159159        app = self.getRootFolder()['app']
     
    161161        p1 = Payment(FakePayer(), FakePayable())
    162162        app['payments']['1'] = p1
    163         p_id = p1.payment_id
    164163        result = get_payments_from_payer_id('PAYER_01')
    165164        self.assertTrue(result[0] is p1)
     
    167166
    168167    def test_get_payments_from_payable_id(self):
    169         # we can lookup payments.
     168        # we can lookup payments from payable ids.
    170169        self.getRootFolder()['app'] = Company()
    171170        app = self.getRootFolder()['app']
     
    173172        p1 = Payment(FakePayer(), FakePayable())
    174173        app['payments']['1'] = p1
    175         p_id = p1.payment_id
    176174        result = get_payments_from_payable_id('PAYABLE_01')
    177175        self.assertTrue(result[0] is p1)
Note: See TracChangeset for help on using the changeset viewer.