Did I find the right examples for you? yes no

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

src/c/o/collective.themeswitcher-1.0a2/collective/themeswitcher/tests/test_switcher.py   collective.themeswitcher(Download)
    def test_getDefaultSkin(self):
        skin = self.switcher.getDefaultSkin(self._old_getDefaultSkin)
        self.assertEqual(skin, 'old default skin')
 
        #try throw the monkey patch
        self.assertEqual(self.portal.portal_skins.getDefaultSkin(),
    def test_getSettings(self):
        settings = self.switcher.getSettings(self._old_settings)
        self.assertEqual(settings, 'old settings')
 
        #TODO but don't know how: try throw the monkey patch
    def test_getDefaultSkin(self):
        #self.switcher.theme = None
        skin = self.switcher.getDefaultSkin(self._old_getDefaultSkin)
        self.assertEqual(skin, 'old default skin')
 
        self.switcher.theme = 'not existing theme'
        skin = self.switcher.getDefaultSkin(self._old_getDefaultSkin)
        self.assertEqual(skin, 'old default skin')

src/c/o/collective.themeswitcher-1.0a2/collective/themeswitcher/tests/test_setup.py   collective.themeswitcher(Download)
    def test_monkeypatch(self):
        self.assertEqual(self.portal.portal_skins.getDefaultSkin.__module__,
                         'collective.themeswitcher.SkinsTool')
        from plone.app.theming.transform import ThemeTransform
        self.assertEqual(ThemeTransform.getSettings.__module__,