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

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

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testPeriodEnd.py   Products.BastionLedger(Download)
    def testEOD(self):
        self.assertEqual(self.ledger.accrued_to, ceiling_date(self.now))
        self.assertEqual(self.ledger.requiresEOD(), False)
        self.assertEqual(self.ledger.requiresEOD(self.now + 2), True)
        self.assertEqual(self.ledger.requiresEOD(DateTime('1900/01/01')), False)
    def testStartDates(self):
        effective = DateTime('2009/01/01')
        periods = self.ledger.periods
 
        self.assertEqual(periods.nextPeriodStart(effective), EPOCH)

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testAccount.py   Products.BastionLedger(Download)
    def testEmptyStuff(self):
        ledger = self.ledger.Ledger
        account = ledger.A000001
 
        self.assertEqual(account.blLedger(), ledger)
        self.assertEqual(account.openingBalance(), ledger.zeroAmount())
        self.assertEqual(account.openingDate(), EPOCH)
 
        self.assertEqual(account.base_currency, 'GBP')
        self.assertEqual(account.isFCA(), False)

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testAssetRegister.py   Products.BastionLedger(Download)
    def testAmountBeforePurchaseDate(self):
        self.assertEqual(self.portal.asset.depreciation((EPOCH, dtrange[0] - 1)), ZCurrency('GBP 0.00'))
 
    def testZeroHistCostDay(self):
        self.assertEqual(self.portal.asset.zeroValueDate(), DateTime('2007/01/01'))
 
    def testDepreciationDays(self):
        self.assertEqual(self.portal.asset.depreciationDays(dtrange), 365)
    def testPrimeCost(self):
        self.assertEqual(self.portal.asset.depreciation(dtrange), ZCurrency('GBP1000'))
        self.portal.asset._updateProperty('effective_life', 2)
        self.assertEqual(self.portal.asset.purchase_date, DateTime('2006/01/01'))
        self.assertEqual(min(DateTime('2008/01/01'), DateTime('2007/01/01')), DateTime('2007/01/01'))

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testLedger.py   Products.BastionLedger(Download)
    def testDefaultCurrency(self):
        self.assertEqual(self.ledger.Ledger.defaultCurrency(), 'GBP')
 
    def testBatchMacros(self):
        # context/batch_macros/macros/navigation ...
    def testNoSearchResultsDups(self):
        # tests that indexes have been restored after copy ...
        ledger = self.ledger.Ledger
        self.assertEqual(ledger.accountValues(accno=('2155',)), [ledger._getOb(self.SALESTAX_ID)])
 
 
    def testGlobalTags(self):
        ledger = self.ledger.Ledger
 
        self.assertEqual(map(lambda x: x.getId(),
        #self.assertEqual(len(filter(lambda x: not x['global'], new_tags)), 1)
 
        self.assertEqual(len(ledger.accountValues(tags='crap1')), 1)
        self.assertEqual(map(lambda x: x.getId(), ledger.accountValues(tags='crap1')),
                         map(lambda x: x.getId(), ledger.accountValues(accno='1820')))

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testTaxTables.py   Products.BastionLedger(Download)
    def testConstructed(self):
        self.assertEqual(self.table.indexes(), ['effective_date'])
 
    def testCanAddRate(self):
        self.addRate(0.35,DateTime('1980/01/01'))
 
        self.assertEqual(len(self.table.objectIds()),1)
        self.assertEqual(len(self.table._catalog), 1)
        fields = table_rec.fields()
        fields.sort()
        self.assertEqual(fields, ['code', 'effective_date','rate',])
 
    def testRateOrdering(self):
        recs = self.table.objectValues()
 
        self.assertEqual(min(recs).effective(), DateTime('1980/01/01'))
        self.assertEqual(max(recs).effective(), DateTime('1982/01/01'))
 

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testPayroll.py   Products.BastionLedger(Download)
    def testCreated(self):
        # the big all-in test ...
        self.assertEqual(self.payroll.meta_type, 'BLPayroll')
        self.assertEqual(self.payroll.currencies, ['GBP'])
        self.assertEqual(self.employee.Title(), 'me')
    def testPersonalTaxTable(self):
        # hmmm - make sure we're playing with what we think we are ...
 
        personal_tax = self.portal.portal_bastionledger.personal_tax
        self.assertEqual(len(personal_tax.objectIds()), 4)
        self.assertEqual(personal_tax._catalog.indexes['amount'].base_currency,

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testInventory.py   Products.BastionLedger(Download)
                                ledger.accountValues(tags='part_cogs')[0].getId())
 
        self.assertEqual(self.widget.sellprice, ZCurrency('GBP10'))
        self.assertEqual(self.widget.listprice, ZCurrency('GBP20'))
        self.assertEqual(self.widget.lastcost,  ZCurrency('GBP10'))
 
 
    def testPartContentStuff(self):
        self.assertEqual(self.widget.text_format, 'structured-text')
 
        id = inventory.invokeFactory(type_name='BLPart', id='widget22')
        self.assertEqual(id, 'widget22')
 
        id = inventory.invokeFactory(type_name='BLPartFolder', id='folder22')

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testSubsidiaryTransaction.py   Products.BastionLedger(Download)
        dt = DateTime(self.ledger.timezone)
 
        self.assertEqual(len(self.ledger.searchResults()), INDEX_COUNT + 1)
 
        tid = ledger.manage_addProduct['BastionLedger'].manage_addBLSubsidiaryTransaction(effective=dt)
	txn = ledger._getOb(tid)
 
        self.assertEqual(len(self.ledger.searchResults()), INDEX_COUNT + 2)
 
        txn.manage_addProduct['BastionLedger'].manage_addBLEntry('A000001', 'GBP 10.00')
        self.assertEqual(len(self.ledger.searchResults()), INDEX_COUNT + 3)
        self.assertEqual(txn.total(), ZCurrency('GBP10.00'))
 
        txn.manage_addProduct['BastionLedger'].manage_addBLSubsidiaryEntry('A1000000', 'GBP -10.00')
        self.assertEqual(len(self.ledger.searchResults()), INDEX_COUNT + 4)

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testProduct.py   Products.BastionLedger(Download)
    def testCatalogIndexes(self):
        ledger = self.ledger
        ndxs = ledger._catalog.indexes.keys()
        ndxs.sort()
        self.assertEqual(ndxs, ['accno', 'accountId', 'created', 'effective', 
        types.sort()
 
        self.assertEqual(types, ['BLAssetRegister', 'BLCashBook', 'BLForecaster', 
                                 'BLInventory', 'BLOrderBook', 'BLPayroll', 
                                 'BLQuoteManager', 'BLShareholderLedger', 
        # BastionMerchantService barfs ...
        for t in types[:-1]:
            self.assertEqual((mt.allowType(t), t), (1, t))
 
def test_suite():

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testFSBLProcess.py   Products.BastionLedger(Download)
        dirinfo = _dirreg._directories
 
        self.assertEqual(dirinfo['BastionLedger/skins/bastionledger'].__class__.__name__, 
                         'TxnTmplDirectoryInformation')
        self.assertEqual(dirinfo[tmpl_path].__class__.__name__, 
                         'TransactionInformation')
        self.assertEqual(_dirreg.getDirectoryInfo(tmpl_path).__class__.__name__, 
 
        txntmpl = getattr(self.portal.portal_skins.bastionledger, 'blp_dividend_payment')
        self.assertEqual(txntmpl.__class__.__name__, 'FSBLTransactionTemplateViewSurrogate')
 
    def testShareholders(self):
        txntmpl = getattr(self.portal.portal_skins.bastionledger, 'blp_dividend_payment')
        ids = txntmpl.objectIds()
        ids.sort()
        self.assertEqual(ids, ['bank', 'shareholder'])

  1 | 2  Next