Permalink
Browse files

- Make tests pass on Pyramid 1.0; squash testing deprecation warnings.

  • Loading branch information...
1 parent 6cbcce4 commit 636193fa4eda2e42c6885f0dc73198f20fbd3dd1 @mcdonc mcdonc committed Jan 31, 2011
Showing with 11 additions and 7 deletions.
  1. +5 −0 CHANGES.txt
  2. +4 −4 pyramid_zcml/tests/test_integration.py
  3. +2 −3 pyramid_zcml/tests/test_units.py
View
@@ -1,3 +1,8 @@
+Next release
+------------
+
+- Make tests pass on Pyramid 1.0; squash testing deprecation warnings.
+
0.1
---
@@ -37,7 +37,7 @@ def test_error(self):
self.assertEqual(res.body, 'supressed')
def test_protected(self):
- self.testapp.get('/protected.html', status=401)
+ self.testapp.get('/protected.html', status=403)
class TestCCBug(IntegrationBase):
# "unordered" as reported in IRC by author of
@@ -128,17 +128,17 @@ def test_test(self):
self.failUnless('ACLDenied' in res.body)
def test_x(self):
- self.testapp.get('/x', status=401)
+ self.testapp.get('/x', status=403)
class TestDefaultViewPermissionBug(IntegrationBase):
# default_view_permission bug as reported by Wiggy at http://lists.repoze.org/pipermail/repoze-dev/2010-October/003602.html
config = 'pyramid_zcml.tests.defpermbugapp:configure.zcml'
def test_x(self):
- res = self.testapp.get('/x', status=401)
+ res = self.testapp.get('/x', status=403)
self.failUnless('failed permission check' in res.body)
def test_y(self):
- res = self.testapp.get('/y', status=401)
+ res = self.testapp.get('/y', status=403)
self.failUnless('failed permission check' in res.body)
def test_z(self):
@@ -652,8 +652,7 @@ def _callFUT(self, *arg, **kw):
return static(*arg, **kw)
def test_it_with_slash(self):
- from pyramid import testing
- testing.registerDummySecurityPolicy(permissive=False)
+ self.config.testing_securitypolicy(permissive=False)
from pyramid.static import PackageURLParser
from zope.interface import implementedBy
from pyramid.static import StaticURLInfo
@@ -697,7 +696,7 @@ def test_it_with_slash(self):
def test_it_with_nondefault_permission(self):
from pyramid import testing
from pyramid.exceptions import Forbidden
- testing.registerDummySecurityPolicy(permissive=False)
+ self.config.testing_securitypolicy(permissive=False)
from zope.interface import implementedBy
from pyramid.static import StaticURLInfo
from pyramid.interfaces import IView

0 comments on commit 636193f

Please sign in to comment.