Changeset 12825 for main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests
- Timestamp:
- 24 Mar 2015, 12:45:18 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py
r12793 r12825 1660 1660 radio_ctrl.displayValue = ['Credit Card (Demo Payments)'] 1661 1661 self.browser.getControl(self.never_ending_button_text).click() 1662 1663 1664 class PaymentsUITests(CustomersFullSetup): 1665 # Tests for contract related views and pages 1666 1667 def setup_payment(self): 1668 payer = IPayer(self.customer) 1669 payable = IPayable(self.contract) 1670 self.payment = Payment(payer, payable) 1671 self.payment.gateway_service = 'demo_creditcard' 1672 self.payment.state = STATE_PAID 1673 self.payment.title = u'My payment' 1674 self.app['payments'][self.payment.payment_id] = self.payment 1675 1676 def add_product_option(self, contract): 1677 prodoption = ProductOption() 1678 prodoption.title = u'Any product option' 1679 prodoption.fee = Decimal('88.8') 1680 prodoption.currency = 'EUR' 1681 contract.product_options = [prodoption, ] 1682 1683 def test_view_payments(self): 1684 self.add_product_option(self.contract) 1685 self.setup_payment() 1686 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 1687 self.browser.open(self.customer_path) 1688 self.assertEqual(self.browser.headers['Status'], '200 Ok') 1689 self.assertEqual(self.browser.url, self.customer_path) 1690 self.browser.open(self.customer_path) 1691 self.browser.getLink("Payments", index=1).click() 1692 self.assertTrue( 1693 '<td>Credit Card (Demo Payments)</td>' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.