diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-01-15 14:03:15 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-01-15 14:03:15 +0000 |
| commit | ed2d14004304199cb60d96d949d6d0f26254cb32 (patch) | |
| tree | a69ca446d3cca04a8a5ce60a64e9b749dbcf448e | |
| parent | 6049d926a36dd2e2a5127a475ee73d2914e14eb4 (diff) | |
| download | pyramid-ed2d14004304199cb60d96d949d6d0f26254cb32.tar.gz pyramid-ed2d14004304199cb60d96d949d6d0f26254cb32.tar.bz2 pyramid-ed2d14004304199cb60d96d949d6d0f26254cb32.zip | |
Get rid of PlacelessSetup.
| -rw-r--r-- | repoze/bfg/tests/test_push.py | 8 | ||||
| -rw-r--r-- | repoze/bfg/tests/test_security.py | 50 | ||||
| -rw-r--r-- | repoze/bfg/tests/test_traversal.py | 8 | ||||
| -rw-r--r-- | repoze/bfg/tests/test_zcml.py | 20 |
4 files changed, 43 insertions, 43 deletions
diff --git a/repoze/bfg/tests/test_push.py b/repoze/bfg/tests/test_push.py index 83f02850b..4220d9a5a 100644 --- a/repoze/bfg/tests/test_push.py +++ b/repoze/bfg/tests/test_push.py @@ -1,13 +1,13 @@ import unittest -from zope.component.testing import PlacelessSetup +from zope.testing.cleanup import cleanUp -class Test_pushpage(unittest.TestCase, PlacelessSetup): +class Test_pushpage(unittest.TestCase): def setUp(self): - PlacelessSetup.setUp(self) + cleanUp() def tearDown(self): - PlacelessSetup.tearDown(self) + cleanUp() def _zcmlConfigure(self): import repoze.bfg.includes diff --git a/repoze/bfg/tests/test_security.py b/repoze/bfg/tests/test_security.py index 449933c7e..e9f35f57f 100644 --- a/repoze/bfg/tests/test_security.py +++ b/repoze/bfg/tests/test_security.py @@ -1,6 +1,6 @@ import unittest -from zope.component.testing import PlacelessSetup +from zope.testing.cleanup import cleanUp class TestACLAuthorizer(unittest.TestCase): def _getTargetClass(self): @@ -182,7 +182,13 @@ class TestACLAuthorizer(unittest.TestCase): self.assertEqual(result, True) -class TestACLSecurityPolicy(unittest.TestCase, PlacelessSetup): +class TestACLSecurityPolicy(unittest.TestCase): + def setUp(self): + cleanUp() + + def tearDown(self): + cleanUp() + def _getTargetClass(self): from repoze.bfg.security import ACLSecurityPolicy return ACLSecurityPolicy @@ -191,12 +197,6 @@ class TestACLSecurityPolicy(unittest.TestCase, PlacelessSetup): klass = self._getTargetClass() return klass(*arg, **kw) - def setUp(self): - PlacelessSetup.setUp(self) - - def tearDown(self): - PlacelessSetup.tearDown(self) - def test_class_implements_ISecurityPolicy(self): from zope.interface.verify import verifyClass from repoze.bfg.interfaces import ISecurityPolicy @@ -316,7 +316,13 @@ class TestACLSecurityPolicy(unittest.TestCase, PlacelessSetup): result = policy.principals_allowed_by_permission(None, 'read') self.assertEqual(result, []) -class TestRemoteUserACLSecurityPolicy(unittest.TestCase, PlacelessSetup): +class TestRemoteUserACLSecurityPolicy(unittest.TestCase): + def setUp(self): + cleanUp() + + def tearDown(self): + cleanUp() + def _getTargetClass(self): from repoze.bfg.security import RemoteUserACLSecurityPolicy return RemoteUserACLSecurityPolicy @@ -325,12 +331,6 @@ class TestRemoteUserACLSecurityPolicy(unittest.TestCase, PlacelessSetup): klass = self._getTargetClass() return klass(*arg, **kw) - def setUp(self): - PlacelessSetup.setUp(self) - - def tearDown(self): - PlacelessSetup.tearDown(self) - def test_instance_implements_ISecurityPolicy(self): from zope.interface.verify import verifyObject from repoze.bfg.interfaces import ISecurityPolicy @@ -367,7 +367,13 @@ class TestRemoteUserACLSecurityPolicy(unittest.TestCase, PlacelessSetup): from repoze.bfg.security import Everyone self.assertEqual(result, [Everyone]) -class TestRepozeWhoIdentityACLSecurityPolicy(unittest.TestCase, PlacelessSetup): +class TestRepozeWhoIdentityACLSecurityPolicy(unittest.TestCase): + def setUp(self): + cleanUp() + + def tearDown(self): + cleanUp() + def _getTargetClass(self): from repoze.bfg.security import RepozeWhoIdentityACLSecurityPolicy return RepozeWhoIdentityACLSecurityPolicy @@ -376,12 +382,6 @@ class TestRepozeWhoIdentityACLSecurityPolicy(unittest.TestCase, PlacelessSetup): klass = self._getTargetClass() return klass(*arg, **kw) - def setUp(self): - PlacelessSetup.setUp(self) - - def tearDown(self): - PlacelessSetup.tearDown(self) - def test_instance_implements_ISecurityPolicy(self): from zope.interface.verify import verifyObject from repoze.bfg.interfaces import ISecurityPolicy @@ -420,12 +420,12 @@ class TestRepozeWhoIdentityACLSecurityPolicy(unittest.TestCase, PlacelessSetup): from repoze.bfg.security import Everyone self.assertEqual(result, [Everyone]) -class TestAPIFunctions(unittest.TestCase, PlacelessSetup): +class TestAPIFunctions(unittest.TestCase): def setUp(self): - PlacelessSetup.setUp(self) + cleanUp() def tearDown(self): - PlacelessSetup.tearDown(self) + cleanUp() def _registerSecurityPolicy(self, secpol): import zope.component diff --git a/repoze/bfg/tests/test_traversal.py b/repoze/bfg/tests/test_traversal.py index 12c7d3741..e83717843 100644 --- a/repoze/bfg/tests/test_traversal.py +++ b/repoze/bfg/tests/test_traversal.py @@ -1,6 +1,6 @@ import unittest -from zope.component.testing import PlacelessSetup +from zope.testing.cleanup import cleanUp class SplitPathTests(unittest.TestCase): def _callFUT(self, path): @@ -23,12 +23,12 @@ class SplitPathTests(unittest.TestCase): self.assertEqual(self._callFUT('/foo/space%20thing/bar'), ['foo', 'space thing', 'bar']) -class ModelGraphTraverserTests(unittest.TestCase, PlacelessSetup): +class ModelGraphTraverserTests(unittest.TestCase): def setUp(self): - PlacelessSetup.setUp(self) + cleanUp() def tearDown(self): - PlacelessSetup.tearDown(self) + cleanUp() def _getTargetClass(self): from repoze.bfg.traversal import ModelGraphTraverser diff --git a/repoze/bfg/tests/test_zcml.py b/repoze/bfg/tests/test_zcml.py index bed1708c0..560c5ffbb 100644 --- a/repoze/bfg/tests/test_zcml.py +++ b/repoze/bfg/tests/test_zcml.py @@ -1,13 +1,13 @@ import unittest -from zope.component.testing import PlacelessSetup +from zope.testing.cleanup import cleanUp -class TestViewDirective(unittest.TestCase, PlacelessSetup): +class TestViewDirective(unittest.TestCase): def setUp(self): - PlacelessSetup.setUp(self) + cleanUp() def tearDown(self): - PlacelessSetup.tearDown(self) + cleanUp() def _callFUT(self, *arg, **kw): from repoze.bfg.zcml import view @@ -227,12 +227,12 @@ class TestViewDirective(unittest.TestCase, PlacelessSetup): self.assertEqual(regadapt['args'][5], None) -class TestFixtureApp(unittest.TestCase, PlacelessSetup): +class TestFixtureApp(unittest.TestCase): def setUp(self): - PlacelessSetup.setUp(self) + cleanUp() def tearDown(self): - PlacelessSetup.tearDown(self) + cleanUp() def test_registry_actions_can_be_pickled_and_unpickled(self): import repoze.bfg.tests.fixtureapp as package @@ -249,11 +249,11 @@ class TestFixtureApp(unittest.TestCase, PlacelessSetup): new = cPickle.loads(dumped) self.assertEqual(len(actions), len(new)) -class TestZCMLPickling(unittest.TestCase, PlacelessSetup): +class TestZCMLPickling(unittest.TestCase): i = 0 def setUp(self): + cleanUp() self.tempdir = None - PlacelessSetup.setUp(self) import sys import os import tempfile @@ -274,7 +274,7 @@ class TestZCMLPickling(unittest.TestCase, PlacelessSetup): self.tempdir = tempdir def tearDown(self): - PlacelessSetup.tearDown(self) + cleanUp() import sys import shutil if self.module is not None: |
