Changeset 12775 for main/waeup.ikoba/trunk/src
- Timestamp:
- 16 Mar 2015, 12:53:09 (10 years ago)
- 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 23 23 from waeup.ikoba.interfaces import MessageFactory as _ 24 24 from 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 25 from waeup.ikoba.browser.layout import IkobaPage 30 26 from waeup.ikoba.payments.interfaces import ( 31 27 IPaymentsContainer, IPayment, payment_states … … 192 188 self.flash(_('Successfully removed: ${a}', 193 189 mapping={'a': ','.join(deleted)})) 194 ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','') 190 ob_class = self.__implemented__.__name__.replace( 191 'waeup.ikoba.', '') 195 192 self.context.logger.info( 196 193 '%s - removed: %s' % (ob_class, ','.join(deleted))) -
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/catalog.py
r12762 r12775 19 19 """ 20 20 import grok 21 from hurry.query import Eq , Text21 from hurry.query import Eq 22 22 from hurry.query.query import Query 23 23 from zope.catalog.interfaces import ICatalog -
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/container.py
r12766 r12775 45 45 raise NotImplementedError() 46 46 47 47 48 PaymentsContainer = attrs_to_fields(PaymentsContainer) 49 48 50 49 51 class PaymentsPlugin(grok.GlobalUtility): -
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_browser.py
r12767 r12775 1 1 ## $Id: test_browser.py 12762 2015-03-14 13:49:29Z henrik $ 2 ## 2 ## 3 3 ## Copyright (C) 2015 Uli Fouquet & Henrik Bettermann 4 4 ## This program is free software; you can redistribute it and/or modify … … 6 6 ## the Free Software Foundation; either version 2 of the License, or 7 7 ## (at your option) any later version. 8 ## 8 ## 9 9 ## This program is distributed in the hope that it will be useful, 10 10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of 11 11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 12 ## GNU General Public License for more details. 13 ## 13 ## 14 14 ## You should have received a copy of the GNU General Public License 15 15 ## along with this program; if not, write to the Free Software … … 22 22 import os 23 23 from decimal import Decimal 24 from waeup.ikoba.testing import FunctionalLayer , FunctionalTestCase24 from waeup.ikoba.testing import FunctionalLayer 25 25 from waeup.ikoba.payments.payment import Payment 26 26 from waeup.ikoba.payments.interfaces import IPayer, IPayable 27 from waeup.ikoba.browser.tests.test_pdf import samples_dir28 27 from waeup.ikoba.products.productoptions import ProductOption 29 28 from waeup.ikoba.customers.tests.test_browser import CustomersFullSetup … … 67 66 self.assertTrue('Empty search string' in self.browser.contents) 68 67 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 70 70 self.browser.getControl("Find payment(s)").click() 71 71 self.assertTrue( … … 82 82 logcontent = open(logfile).read() 83 83 self.assertTrue( 84 'INFO - zope.mgr - payments.browser.PaymentsContainerManagePage - removed: %s' 84 ('INFO - zope.mgr - payments.browser.' 85 'PaymentsContainerManagePage - removed: %s') 85 86 % self.payment.payment_id in logcontent) -
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_payment.py
r12774 r12775 155 155 156 156 def test_get_payments_from_payer_id(self): 157 # we can lookup payments .157 # we can lookup payments from payer ids. 158 158 self.getRootFolder()['app'] = Company() 159 159 app = self.getRootFolder()['app'] … … 161 161 p1 = Payment(FakePayer(), FakePayable()) 162 162 app['payments']['1'] = p1 163 p_id = p1.payment_id164 163 result = get_payments_from_payer_id('PAYER_01') 165 164 self.assertTrue(result[0] is p1) … … 167 166 168 167 def test_get_payments_from_payable_id(self): 169 # we can lookup payments .168 # we can lookup payments from payable ids. 170 169 self.getRootFolder()['app'] = Company() 171 170 app = self.getRootFolder()['app'] … … 173 172 p1 = Payment(FakePayer(), FakePayable()) 174 173 app['payments']['1'] = p1 175 p_id = p1.payment_id176 174 result = get_payments_from_payable_id('PAYABLE_01') 177 175 self.assertTrue(result[0] is p1)
Note: See TracChangeset for help on using the changeset viewer.