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

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

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testLedger.py   Products.BastionLedger(Download)
    def testLocalTags(self):
        ledger = self.ledger.Ledger
 
        self.failIf('crap1' in self.ledger.uniqueValuesFor('tags'))
 
    def testLocalAddInGlobal(self):
        ledger = self.ledger.Ledger
 
        self.failIf('sales_tax_due' in self.ledger.uniqueValuesFor('tags'))
        ledger.manage_addTag('sales_tax_due', ['1820'])
        self.failIf('sales_tax_due' in self.ledger.uniqueValuesFor('tags'))
 
        # a more advanced query ...
        self.failIf(account in ledger.accountValuesAdv(Eq('type', account.type) & ~Eq('accno', account.accno)))
 
        # new summation/totalling stuff
 
        self.assertEqual(account.accno, '1820')
        self.failIf('crap2' in account.tags)
        self.failUnless('crap3' in account.tags)
 

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/tests/testAccount.py   Products.BastionLedger(Download)
 
        self.assertEqual(account.tags, ())
        self.failIf(account.hasTag('Whippee'))
        self.assertEqual(self.ledger.uniqueValuesFor('tags'), ())
 
        self.assertEqual(self.ledger._catalog.indexes['tags'].uniqueValues(), ())
 
        self.failIf('tag1' in self.ledger.uniqueValuesFor('tags'))
        account.updateTags('tag1')
 
 
        self.assertEqual(account.tags, ())
        self.failIf('bank_account' in self.ledger.uniqueValuesFor('tags'))
 
    def testBalanceFunctions(self):