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

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

src/p/r/Products.salesforcepfgadapter-1.9.1/Products/salesforcepfgadapter/tests/testSalesforce.py   Products.salesforcepfgadapter(Download)
 
        # make sure that our adapter is contained w/in the form
        self.failUnless('salesforce' in self.ff1.objectIds())
 
        # set our action adapter and assert that it works
        # iterate through a list of must-haves to make sure they are options
        for sfobjecttype in ('Lead', 'Contact', 'Opportunity',):
            self.failUnless(sfobjecttype in staticListOfObjectTypes,
                "The object type %s is not an option in our display list" % sfobjecttype)
 
        formToSalesforceMapperValues = adapter.getFieldMap()[0].values()
        for wanted in ('replyto', 'Your E-Mail Address', 'Email'):
            self.failUnless(wanted in formToSalesforceMapperValues,
                            "%s missing from %s" % (wanted, formToSalesforceMapperValues))
        formToSalesforceMapperValues = adapter.getFieldMap()[1].values()
        for wanted in ('comments', 'Comments', 'Description'):
            self.failUnless(wanted in formToSalesforceMapperValues,
        adapterToSalesforceFieldValues = adapter.getDependencyMap()[0].values()
        for wanted in ('salesforce2', 'AccountId', 'salesforce2'):
            self.failUnless(wanted in adapterToSalesforceFieldValues,
                            "%s missing from %s" % (wanted, adapterToSalesforceFieldValues))
 

src/p/r/Products.salesforcepfgadapter-1.9.1/Products/salesforcepfgadapter/tests/testSalesforcePFGInstall.py   Products.salesforcepfgadapter(Download)
    def testDependenciesInstalled(self):
        DEPENDENCIES = ['PloneFormGen','DataGridField',]
 
        for depend in DEPENDENCIES:
            self.failUnless(self.portal.portal_quickinstaller.isProductInstalled(depend),
                "Dependency product %s is not already installed" % depend)
 
    def testAdapterTypeRegistered(self):
        for t in self.metaTypes:
            self.failUnless(t in self.types.objectIds())
    def testPortalFactorySetup(self):
        for t in self.metaTypes:
            self.failUnless(t in self.factory.getFactoryTypes(),
                "Type %s is not a factory types" % t)
 
    def testTypesNotSearched(self):
        types_not_searched = self.properties.site_properties.getProperty('types_not_searched')
        for t in self.metaTypes:
            self.failUnless(t in types_not_searched,
    def testTypesNotSearchedListNotPurged(self):
        types_not_searched = self.properties.site_properties.getProperty('types_not_searched')
        self.failUnless(len(types_not_searched) > 1,
            "There are plenty of stock types that are excluded from "
            "search, but we presumably just have our own due to a purge "

src/p/r/Products.salesforcepfgadapter-1.9.1/Products/salesforcepfgadapter/tests/testSalesforcePFGAdapterUninstall.py   Products.salesforcepfgadapter(Download)
 
        for depend in DEPENDENCIES:
            self.failUnless(self.qi.isProductInstalled(depend),
                "Dependency product %s is not already installed" % depend)    
 
 
        # ensure installable after uninstall
        self.failUnless(self.qi.isProductInstallable('salesforcepfgadapter'))
        self.qi.installProducts(products=['salesforcepfgadapter',])
 
        # uninstall product
        self.qi.uninstallProducts(products=['salesforcepfgadapter',])
        self.failUnless(self.qi.isProductInstallable('salesforcepfgadapter'))

src/p/r/Products.salesforcepfgadapter-1.9.1/Products/salesforcepfgadapter/tests/testChainedAdapters.py   Products.salesforcepfgadapter(Download)
        adapter_ids = [mapping.initialData['adapter_id'] for mapping in first.getLocalSFAdapters()]
        for x in range(1,3):
            self.failUnless('Adapter #%s' % x in adapter_names)
            self.failUnless('adapter%s' % x in adapter_ids)
        self.failIf('Adapter #0' in adapter_names)
        # implicit test that the Mailer adapter isn't here: len should be 2
        self.failUnless(len(adapter_names)==2)
 
        # make sure the subject field exists
        self.failUnless('Salesforce Adapter #2' in adapter_titles_for_mapping)
 
        # map our soon to be retitled item
        # make sure the renamed item does exists, while the old title does not
        self.failIf('Salesforce Adapter #2' in regenerated_adapter_titles_for_mapping)
        self.failUnless('Renamed Salesforce Adapter #2' in regenerated_adapter_titles_for_mapping)
 
    def testRemovedAdapterCleanedFromStaticParentAdapterVocabs(self):

src/p/r/Products.salesforcepfgadapter-1.9.1/Products/salesforcepfgadapter/tests/testMigrations.py   Products.salesforcepfgadapter(Download)
        # assert that misnamed type exists in Type index, and the 
        # meta/portal type remains as expected
        self.failUnless("SalesforcePFGAdapter" in self.catalog.uniqueValuesFor('portal_type'))
        self.failUnless("SalesforcePFGAdapter" in self.catalog.uniqueValuesFor('meta_type'))
        self.failUnless("Unmigrated" in self.catalog.uniqueValuesFor('Type'))
 
        # our migration is happen
        self.failUnless("SalesforcePFGAdapter" in self.catalog.uniqueValuesFor('portal_type'))
        self.failUnless("SalesforcePFGAdapter" in self.catalog.uniqueValuesFor('meta_type'))
        self.failUnless("Salesforce Adapter" in self.catalog.uniqueValuesFor('Type'))

src/p/r/Products.salesforcepfgadapter-1.9.1/Products/salesforcepfgadapter/tests/testChainedAdaptersSorting.py   Products.salesforcepfgadapter(Download)
              - c precedes d
        """
        self.failUnless(sorted_.index('a') < sorted_.index('b'))
        self.failUnless(sorted_.index('b') < sorted_.index('d'))
        self.failUnless(sorted_.index('c') < sorted_.index('d'))
        self.failUnless('e' in sorted_)

src/p/r/Products.salesforcepfgadapter-1.9.1/Products/salesforcepfgadapter/tests/testValidators.py   Products.salesforcepfgadapter(Download)
        c.setDependencyMap(({'adapter_id': 'a', 'adapter_name': 'a', 'sf_field': '1'},))
 
        self.failUnless(self.validator(({'adapter_id':'a', 'sf_field': '1'},), **{'instance':c})==True)