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

All Samples(106)  |  Call(106)  |  Derive(0)  |  Import(0)
Same as self.assertTrue(isinstance(obj, cls)), with a nicer
default message.

src/p/t/ptah-0.8.0/ptah/manage/tests/test_manage.py   ptah(Download)
        route = PtahManageRoute(self.request)
        mod = route['test-module']
        self.assertIsInstance(mod, TestModule)
        self.assertTrue(mod.available())
        self.assertEqual(mod.__name__, 'test-module')
 
        cfg = config.ptah_get_settings(ptah.CFG_ID_PTAH)
        self.assertIsInstance(cfg['access_manager'], PtahAccessManager)
 
    def test_manage_view(self):
        v.update()
 
        self.assertIsInstance(v.modules[-1], TestModule)
 
    def test_manage_view_unavailable(self):
 
        mod = route['test-module']
        self.assertIsInstance(mod, TestModule)
 
    def test_manage_enable_modules(self):

src/p/t/ptah-HEAD/ptah/manage/tests/test_manage.py   ptah(Download)
        route = PtahManageRoute(self.request)
        mod = route['test-module']
        self.assertIsInstance(mod, TestModule)
        self.assertTrue(mod.available())
        self.assertEqual(mod.__name__, 'test-module')
 
        cfg = config.ptah_get_settings(ptah.CFG_ID_PTAH)
        self.assertIsInstance(cfg['access_manager'], PtahAccessManager)
 
    def test_manage_view(self):
        v.update()
 
        self.assertIsInstance(v.modules[-1], TestModule)
 
    def test_manage_view_unavailable(self):
 
        mod = route['test-module']
        self.assertIsInstance(mod, TestModule)
 
    def test_manage_enable_modules(self):

src/p/t/ptahcms-0.5.1/ptahcms/manage/tests/test_apps.py   ptahcms(Download)
        mod = mr['apps']
 
        self.assertIsInstance(mod, ApplicationsModule)
        self.assertFalse(mod.available())
 
 
        item = mod['app1']
        self.assertIsInstance(item, TestApp1)
        self.assertIs(request.app_factory, factory1)
 
        item = mod['app2']
        self.assertIsInstance(item, TestApp2)
        res = form.update()
 
        self.assertIsInstance(res, HTTPFound)
        self.assertIn('apps-sharing-term', form.request.session)
        self.assertEqual(

src/p/t/ptahcms-0.5.1/ptahcms/tests/test_container.py   ptahcms(Download)
 
        content = container.create(tname, 'test', title = 'Test title')
        self.assertIsInstance(content, self.Content)
        self.assertIsNotNone(content.created)
        self.assertIsNotNone(content.modified)

src/p/t/ptahcrowd-0.2/ptahcrowd/tests/test_login.py   ptahcrowd(Download)
        view = login.LoginSuspended(None, request)
        res = view.update()
        self.assertIsInstance(res, HTTPFound)
 
    def test_suspended_not(self):
        request = self.make_request()
        res = self.render_route_view(None, request, 'ptah-login-suspended')
        self.assertIsInstance(res, HTTPFound)
 
    def test_suspended(self):
        request = self.make_request()
        res = login.logout(request)
        self.assertIsInstance(res, HTTPFound)
 
    def test_logout(self):
 
        res = login.logout(request)
        self.assertIsInstance(res, HTTPFound)
        self.assertIsNone(ptah.auth_service.get_userid())
 
        res = form.login_handler()
 
        self.assertIsInstance(res, HTTPFound)
        self.assertEqual(res.headers['location'],
                         'http://example.com/login-success.html')

src/p/t/ptahcrowd-HEAD/ptahcrowd/tests/test_login.py   ptahcrowd(Download)
        view = login.LoginSuspended(None, request)
        res = view.update()
        self.assertIsInstance(res, HTTPFound)
 
    def test_suspended_not(self):
        request = self.make_request()
        res = self.render_route_view(None, request, 'ptah-login-suspended')
        self.assertIsInstance(res, HTTPFound)
 
    def test_suspended(self):
        request = self.make_request()
        res = login.logout(request)
        self.assertIsInstance(res, HTTPFound)
 
    def test_logout(self):
 
        res = login.logout(request)
        self.assertIsInstance(res, HTTPFound)
        self.assertIsNone(ptah.auth_service.get_userid())
 
        res = form.login_handler()
 
        self.assertIsInstance(res, HTTPFound)
        self.assertEqual(res.headers['location'],
                         'http://example.com/login-success.html')

src/p/t/ptah-0.8.0/ptah/manage/tests/test_settings.py   ptah(Download)
        mod = mr['settings']
 
        self.assertIsInstance(mod, SettingsModule)
 
    def test_settings_view(self):
        tgrp = mod['test']
        self.assertIs(tgrp.group, grp)
        self.assertIsInstance(tgrp, SettingsWrapper)
 
    def test_edit_form(self):
 
        res = form.back_handler()
        self.assertIsInstance(res, HTTPFound)
        self.assertEqual(res.headers['location'], '..')
 

src/p/t/ptahcrowd-0.2/ptahcrowd/tests/test_user.py   ptahcrowd(Download)
        view = CreateUserForm(mod, request)
        res = view.update()
        self.assertIsInstance(res, HTTPFound)
        self.assertEqual(res.headers['location'], '.')
 
        res = view.update()
 
        self.assertIsInstance(res, HTTPFound)
        self.assertEqual(res.headers['location'], '.')
        self.assertIn('User has been created.', request.render_messages())
        res = view.update()
 
        self.assertIsInstance(res, HTTPFound)
        self.assertEqual(res.headers['location'], '..')
 
            res = err
 
        self.assertIsInstance(res, HTTPForbidden)
        self.assertEqual(str(res), 'Form authenticator is not found.')
 
        res = view.update()
 
        self.assertIsInstance(res, HTTPFound)
        self.assertEqual(res.headers['location'], '..')
 

src/p/t/ptah-HEAD/ptah/manage/tests/test_settings.py   ptah(Download)
        mod = mr['settings']
 
        self.assertIsInstance(mod, SettingsModule)
 
    def test_settings_view(self):
        tgrp = mod['test']
        self.assertIs(tgrp.group, grp)
        self.assertIsInstance(tgrp, SettingsWrapper)
 
    def test_edit_form(self):
 
        res = form.back_handler()
        self.assertIsInstance(res, HTTPFound)
        self.assertEqual(res.headers['location'], '..')
 

src/p/t/ptahcrowd-HEAD/ptahcrowd/tests/test_user.py   ptahcrowd(Download)
        view = CreateUserForm(mod, request)
        res = view.update_to_resp()
        self.assertIsInstance(res, HTTPFound)
        self.assertEqual(res.headers['location'], '.')
 
        res = view.update_to_resp()
 
        self.assertIsInstance(res, HTTPFound)
        self.assertEqual(res.headers['location'], '.')
        self.assertIn('User has been created.', request.render_messages())
        res = view.update_to_resp()
 
        self.assertIsInstance(res, HTTPFound)
        self.assertEqual(res.headers['location'], '..')
 
            res = err
 
        self.assertIsInstance(res, HTTPForbidden)
        self.assertEqual(str(res), 'Form authenticator is not found.')
 
        res = view.update_to_resp()
 
        self.assertIsInstance(res, HTTPFound)
        self.assertEqual(res.headers['location'], '..')
 

  1 | 2 | 3 | 4  Next