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

All Samples(81)  |  Call(81)  |  Derive(0)  |  Import(0)
Check that the expression is false.

src/p/t/ptah-0.8.0/ptah/tests/test_password.py   ptah(Download)
 
        p = Principal('unknown-schema:numbers_numbers', 'name', 'login')
        self.assertFalse(ptah.pwd_tool.can_change_password(p))
 
    def test_password_changer_pyramid(self):
        cfg['pwd_manager'] = 'ssha'
 
        self.assertFalse(ptah.pwd_tool.check('12345', '12345'))
        self.assertTrue(ptah.pwd_tool.check('{plain}12345', '12345'))
        self.assertFalse(ptah.pwd_tool.check('{plain}12345', '123455'))
        self.assertFalse(ptah.pwd_tool.check('{unknown}12345', '123455'))
        self.assertIsNone(newp)
 
        self.assertFalse(ptah.pwd_tool.change_password('unknown', '12345'))
 
    def test_password_validate(self):

src/p/t/ptah-HEAD/ptah/tests/test_password.py   ptah(Download)
 
        p = Principal('unknown-schema:numbers_numbers', 'name', 'login')
        self.assertFalse(ptah.pwd_tool.can_change_password(p))
 
    def test_password_changer_pyramid(self):
        cfg['pwd_manager'] = 'ssha'
 
        self.assertFalse(ptah.pwd_tool.check('12345', '12345'))
        self.assertTrue(ptah.pwd_tool.check('{plain}12345', '12345'))
        self.assertFalse(ptah.pwd_tool.check('{plain}12345', '123455'))
        self.assertFalse(ptah.pwd_tool.check('{unknown}12345', '123455'))
        self.assertIsNone(newp)
 
        self.assertFalse(ptah.pwd_tool.change_password('unknown', '12345'))
 
    def test_password_validate(self):

src/p/t/ptahcms-0.5.1/ptahcms/tests/test_tinfo.py   ptahcms(Download)
 
        # always fail
        self.assertFalse(MyContent.__type__.is_allowed(content))
        self.assertRaises(
            HTTPForbidden, MyContent.__type__.check_context, content)
        # permission
        MyContent.__type__.permission = 'Protected'
        self.assertFalse(MyContent.__type__.is_allowed(container))
        self.assertRaises(
            HTTPForbidden, MyContent.__type__.check_context, container)
        self.init_ptah()
 
        self.assertFalse(MyContent.__type__.global_allow)
        self.assertTrue(MyContainer.__type__.global_allow)
 
    def test_names_filter(self):
        from ptahcms.tinfo import names_filter
 
        self.assertFalse(names_filter('_test'))
        self.assertFalse(names_filter('__test__'))

src/p/t/ptah-0.8.0/ptah/manage/tests/test_manage.py   ptah(Download)
        cfg['managers'] = ['admin@ptahproject.org']
 
        self.assertFalse(PtahAccessManager()('test:user', self.request))
 
    def test_manage_access_manager2(self):
 
        self.assertTrue(PtahAccessManager()('test:user', self.request))
        self.assertFalse(PtahAccessManager()('test:user2', self.request))
 
        ptah.get_local_roles = orig_lr
    def test_manage_check_access_no_manager(self):
        self.init_ptah()
        cfg = ptah.get_settings(ptah.CFG_ID_PTAH, self.registry)
        del cfg['access_manager']
        self.assertFalse(ptah.manage.check_access('test:user2', self.request))
                found = True
 
        self.assertFalse(found)
 
    def test_manage_traverse(self):
 
        for mod in view.modules:
            self.assertFalse(isinstance(mod, TestModule))
 
    def test_manage_disable_modules_traverse(self):

src/p/t/ptah-HEAD/ptah/manage/tests/test_manage.py   ptah(Download)
        cfg['managers'] = ['admin@ptahproject.org']
 
        self.assertFalse(PtahAccessManager()('test:user', self.request))
 
    def test_manage_access_manager2(self):
 
        self.assertTrue(PtahAccessManager()('test:user', self.request))
        self.assertFalse(PtahAccessManager()('test:user2', self.request))
 
        ptah.get_local_roles = orig_lr
    def test_manage_check_access_no_manager(self):
        self.init_ptah()
        cfg = ptah.get_settings(ptah.CFG_ID_PTAH, self.registry)
        del cfg['access_manager']
        self.assertFalse(ptah.manage.check_access('test:user2', self.request))
                found = True
 
        self.assertFalse(found)
 
    def test_manage_traverse(self):
 
        for mod in view.modules:
            self.assertFalse(isinstance(mod, TestModule))
 
    def test_manage_disable_modules_traverse(self):

src/p/t/ptah-0.8.0/ptah/tests/test_security.py   ptah(Download)
        content = Content(acl=[DENY_ALL])
 
        self.assertFalse(ptah.check_permission('View', content, throw=False))
        self.assertTrue(ptah.check_permission(
            NO_PERMISSION_REQUIRED, content, throw=False))
 
        self.assertTrue(ptah.check_permission('View', content, throw=False))
        self.assertFalse(ptah.check_permission(
            ptah.NOT_ALLOWED, content, throw=False))
 
        content = Content(acl=[(Allow, ptah.Authenticated.id, 'View')])
 
        self.assertFalse(ptah.check_permission('View', content, throw=False))
 
        ptah.auth_service.set_userid('test-user')
    def test_checkpermission_user(self):
        import ptah
 
        content = Content(acl=[(Allow, 'test-user', 'View')])
        self.assertFalse(ptah.check_permission('View', content, throw=False))
        ptah.auth_service.set_userid(ptah.SUPERUSER_URI)
        self.assertTrue(ptah.check_permission('View', content))
        self.assertFalse(ptah.check_permission(ptah.NOT_ALLOWED, content))
 
    def test_checkpermission_effective_superuser(self):

src/p/t/ptah-HEAD/ptah/tests/test_security.py   ptah(Download)
        content = Content(acl=[DENY_ALL])
 
        self.assertFalse(ptah.check_permission('View', content, throw=False))
        self.assertTrue(ptah.check_permission(
            NO_PERMISSION_REQUIRED, content, throw=False))
 
        self.assertTrue(ptah.check_permission('View', content, throw=False))
        self.assertFalse(ptah.check_permission(
            ptah.NOT_ALLOWED, content, throw=False))
 
        content = Content(acl=[(Allow, ptah.Authenticated.id, 'View')])
 
        self.assertFalse(ptah.check_permission('View', content, throw=False))
 
        ptah.auth_service.set_userid('test-user')
    def test_checkpermission_user(self):
        import ptah
 
        content = Content(acl=[(Allow, 'test-user', 'View')])
        self.assertFalse(ptah.check_permission('View', content, throw=False))
        ptah.auth_service.set_userid(ptah.SUPERUSER_URI)
        self.assertTrue(ptah.check_permission('View', content))
        self.assertFalse(ptah.check_permission(ptah.NOT_ALLOWED, content))
 
    def test_checkpermission_effective_superuser(self):

src/p/t/ptah-0.8.0/ptah/tests/test_auth.py   ptah(Download)
            {'login': 'user', 'password': '12345'})
 
        self.assertFalse(info.status)
        self.assertIsNone(info.principal)
 
            {'login': 'user', 'password': '12345'})
 
        self.assertFalse(info.status)
        self.assertEqual(info.__uri__, '1')
        self.assertEqual(info.message, 'Suspended')
 
        info = ptah.auth_service.authenticate_principal(principal)
        self.assertFalse(info.status)
        self.assertEqual(info.__uri__, '1')
        self.assertEqual(info.message, 'Suspended')
            {'login': 'user', 'password': '12345'})
 
        self.assertFalse(info.status)
        self.assertEqual(info.__uri__, '1')
        self.assertEqual(info.message, 'Suspended')
 
        info = ptah.auth_service.authenticate_principal(principal)
        self.assertFalse(info.status)
        self.assertEqual(info.__uri__, '1')
        self.assertEqual(info.message, 'Suspended')

src/p/t/ptah-HEAD/ptah/tests/test_auth.py   ptah(Download)
            {'login': 'user', 'password': '12345'})
 
        self.assertFalse(info.status)
        self.assertIsNone(info.principal)
 
            {'login': 'user', 'password': '12345'})
 
        self.assertFalse(info.status)
        self.assertEqual(info.__uri__, '1')
        self.assertEqual(info.message, 'Suspended')
 
        info = ptah.auth_service.authenticate_principal(principal)
        self.assertFalse(info.status)
        self.assertEqual(info.__uri__, '1')
        self.assertEqual(info.message, 'Suspended')
            {'login': 'user', 'password': '12345'})
 
        self.assertFalse(info.status)
        self.assertEqual(info.__uri__, '1')
        self.assertEqual(info.message, 'Suspended')
 
        info = ptah.auth_service.authenticate_principal(principal)
        self.assertFalse(info.status)
        self.assertEqual(info.__uri__, '1')
        self.assertEqual(info.message, 'Suspended')

src/p/t/ptahcrowd-0.2/ptahcrowd/tests/test_login.py   ptahcrowd(Download)
        form = login.LoginForm(None, request)
        form.update()
        self.assertFalse(form.join)
        self.assertEqual(form.joinurl, 'http://test/login.html')
 

  1 | 2 | 3  Next