Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(61)  |  Call(61)  |  Derive(0)  |  Import(0)

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testProduct.py   Products.BastionLedger(Download)
    def testCreated(self):
        # f**k knows why these guys behave like ghosts!!
        ledgers = self.ledger.objectIds()
        self.failUnless('Ledger' in ledgers)
        self.failUnless('Receivables' in ledgers)
        self.failUnless('Payables' in ledgers)
        self.failUnless('Inventory' in ledgers)
        self.failUnless('Payroll' in ledgers)

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testPayroll.py   Products.BastionLedger(Download)
        # doCreate should create the real object
        temp_object = ledger.restrictedTraverse('portal_factory/BLEmployee/A222222')
        self.failUnless('A222222' in ledger.restrictedTraverse('portal_factory/BLEmployee').objectIds())
        A222222 = temp_object.portal_factory.doCreate(temp_object, 'A222222')
        self.failUnless('A222222' in ledger.objectIds())
 
        # document_edit should create the real object
        temp_object = ledger.restrictedTraverse('portal_factory/BLEmployee/A222223')
        self.failUnless('A222223' in ledger.restrictedTraverse('portal_factory/BLEmployee').objectIds())
                                   currency='GBP',
                                   accno='2222')
        self.failUnless('2222' in self.ledger.uniqueValuesFor('accno'))
        self.assertEqual(ledger.accountValues(accno='2222')[0].title, 'Foo')
        self.failUnless('A222223' in ledger.objectIds())

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testLedger.py   Products.BastionLedger(Download)
        ledger.manage_addTag('crap1', ['1820'])
 
        self.failUnless('crap1' in self.ledger.uniqueValuesFor('tags'))
 
        new_tags = ledger.itsAssociations()
        self.assertEqual(account.accno, '1820')
        self.failIf('crap2' in account.tags)
        self.failUnless('crap3' in account.tags)
 
    def testVerifyVerifies(self):
        def testCopyPaste(self):
            self.loginAsPortalOwner()
            self.portal.manage_addProduct['OFSP'].manage_addFolder('copies')
            self.portal.copies.manage_pasteObjects(self.portal.manage_copyObjects('ledger'))
            self.failUnless(self.portal.copies.ledger)
 
        def testPortalFactoryCreation(self):
            self.loginAsPortalOwner()
            temp_object = self.portal.restrictedTraverse('portal_factory/Ledger/new_ledger1')
            self.failUnless('new_ledger1' in self.portal.restrictedTraverse('portal_factory/Ledger').objectIds())
            self.failUnless('new_ledger1' in self.portal.restrictedTraverse('portal_factory/Ledger').objectIds())
            new_ledger1 = temp_object.portal_factory.doCreate(temp_object, 'new_ledger1')
            self.failUnless('new_ledger1' in self.portal.objectIds())
 
            # document_edit should create the real object

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testAccount.py   Products.BastionLedger(Download)
        self.assertEqual(account.base_currency, 'GBP')
        self.assertEqual(account.isFCA(), False)
        self.failUnless(abs(account.created() - DateTime()) < self.RUN_TIME)
        self.assertEqual(account.CreationDate()[:10], self.now.strftime('%Y-%m-%d'))
 
        self.assertEqual(account.tags, ('Whippee',))
        self.assertEqual(self.ledger.uniqueValuesFor('tags'), (u'Whippee',))
        self.failUnless(account.hasTag('Whippee'))
 
    def testAddTag(self):
        account.updateTags('tag1')
 
        self.failUnless('tag1' in self.ledger.uniqueValuesFor('tags'))
        self.assertEqual(account.hasTag('tag1'), True)
 
        # doCreate should create the real object
        temp_object = ledger.restrictedTraverse('portal_factory/BLAccount/A222222')
        self.failUnless('A222222' in ledger.restrictedTraverse('portal_factory/BLAccount').objectIds())
        A222222 = temp_object.portal_factory.doCreate(temp_object, 'A222222')
        self.failUnless('A222222' in ledger.objectIds())

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testAssetRegister.py   Products.BastionLedger(Download)
    def testTypeInfo(self):
        tinfo = self.portal.portal_types.getTypeInfo(self.ledger)
        self.failUnless(tinfo.allowType('BLAssetRegister'))
 
    def testPortalFactoryCreation(self):
        self.loginAsPortalOwner()
        ledger = self.ledger
        # doCreate should create the real object
        temp_object = ledger.restrictedTraverse('portal_factory/BLAssetRegister/assets')
        self.failUnless('assets' in ledger.restrictedTraverse('portal_factory/BLAssetRegister').objectIds())
        self.failUnless('assets' in ledger.restrictedTraverse('portal_factory/BLAssetRegister').objectIds())
        assets = temp_object.portal_factory.doCreate(temp_object, 'assets')
        self.failUnless('assets' in ledger.objectIds())
 
        # document_edit should create the real object
        temp_object = ledger.restrictedTraverse('portal_factory/BLAssetRegister/assets2')
        self.failUnless('assets2' in ledger.restrictedTraverse('portal_factory/BLAssetRegister').objectIds())
        temp_object.blassetregister_edit(['Current Assets'])
        self.failUnless('assets2' in ledger.objectIds())

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testPeriodEnd.py   Products.BastionLedger(Download)
    def testCreated(self):
        self.failUnless(self.controller_tool.periodend_tool)
 
    def testEOD(self):
        self.assertEqual(self.ledger.accrued_to, ceiling_date(self.now))
        profit = Ledger._getOb(self.PROFIT_ID)
        tax_defr = Ledger._getOb(self.DEFERRED_ID)
        self.failUnless(loss.hasTag('loss_fwd'))
        self.failUnless(retained.hasTag('retained_earnings'))
        self.failUnless(profit.hasTag('profit_loss'))
        self.failUnless(tax_defr.hasTag('tax_defr'))

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testInventory.py   Products.BastionLedger(Download)
 
        temp_object = inv.restrictedTraverse('portal_factory/BLPart/widget111')
        self.failUnless('widget111' in inv.restrictedTraverse('portal_factory/BLPart').objectIds())
 
        temp_object.blpart_edit("kg", 0.0, 20.0, ZCurrency('GBP 20'), ZCurrency('GBP 20'),
                                ZCurrency('GBP 10'), 'A000005','A000023','A000030')
 
        self.failUnless('widget111' in inv.objectIds())
 
        temp_object = inv.restrictedTraverse('portal_factory/BLPartFolder/widgets111')
        self.failUnless('widgets111' in inv.restrictedTraverse('portal_factory/BLPartFolder').objectIds())
 
        # hmmm - we've got some issues using archetypes ...

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testForecaster.py   Products.BastionLedger(Download)
    def testPortalFactoryCreation(self):
        self.loginAsPortalOwner()
        ledger = self.ledger
        temp_object = ledger.restrictedTraverse('portal_factory/BLForecaster/bla')
        self.failUnless('bla' in ledger.restrictedTraverse('portal_factory/BLForecaster').objectIds())
        bla = temp_object.portal_factory.doCreate(temp_object, 'bla')
        self.failUnless('bla' in ledger.objectIds())

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testLedgerTestCase.py   Products.BastionLedger(Download)
    def testPortalCreated(self):
        self.failUnless(hasattr(aq_base(self.app), portal_name))
 
    def testLedgerCreated(self):
        self.failUnless(hasattr(aq_base(self.portal), ledger_name))
    def testWorkflowToolCreated(self):
        """
        hmmm - workflow tool disappeared ...
        """
        self.failUnless(getattr(self.portal, 'portal_workflow', False))
    def testQuickInstalled(self):
        installed = map(lambda x: x['id'],
                        self.portal.portal_quickinstaller.listInstalledProducts())
        for product in ledger_products:
            self.failUnless(product in installed)

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testQuickInstall.py   Products.BastionLedger(Download)
    def testCompileIt(self):
        self.failUnless(ExternalMethod('temp', 'temp', 'BastionLedger.Install', 'install')) 
 
def test_suite():
    suite = TestSuite()

  1 | 2  Next