summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyramid/tests/test_config/test_init.py11
-rw-r--r--pyramid/tests/test_integration.py10
-rw-r--r--pyramid/tests/test_scripts/test_pdistreport.py1
-rw-r--r--pyramid/tests/test_url.py2
4 files changed, 7 insertions, 17 deletions
diff --git a/pyramid/tests/test_config/test_init.py b/pyramid/tests/test_config/test_init.py
index 7c2880a18..b8cbbd676 100644
--- a/pyramid/tests/test_config/test_init.py
+++ b/pyramid/tests/test_config/test_init.py
@@ -1955,12 +1955,6 @@ class DummyRequest:
self.params = {}
self.cookies = {}
-class DummyResponse:
- status = '200 OK'
- headerlist = ()
- app_iter = ()
- body = ''
-
class DummyThreadLocalManager(object):
pushed = None
popped = False
@@ -1992,11 +1986,6 @@ class DummyRegistry(object):
def queryUtility(self, *arg, **kw):
return self.util
-from pyramid.interfaces import IResponse
-@implementer(IResponse)
-class DummyResponse(object):
- pass
-
from zope.interface import Interface
class IOther(Interface):
pass
diff --git a/pyramid/tests/test_integration.py b/pyramid/tests/test_integration.py
index 66205e618..eda4ae9f3 100644
--- a/pyramid/tests/test_integration.py
+++ b/pyramid/tests/test_integration.py
@@ -72,7 +72,7 @@ class IntegrationBase(object):
here = os.path.dirname(__file__)
-class TestStaticAppBase(IntegrationBase):
+class StaticAppBase(IntegrationBase):
def test_basic(self):
res = self.testapp.get('/minimal.pt', status=200)
_assertBody(res.body, os.path.join(here, 'fixtures/minimal.pt'))
@@ -198,10 +198,10 @@ class TestEventOnlySubscribers(IntegrationBase, unittest.TestCase):
self.assertEqual(sorted(res.body.split()),
[b'foobar', b'foobar2', b'foobaryup', b'foobaryup2'])
-class TestStaticAppUsingAbsPath(TestStaticAppBase, unittest.TestCase):
+class TestStaticAppUsingAbsPath(StaticAppBase, unittest.TestCase):
package = 'pyramid.tests.pkgs.static_abspath'
-class TestStaticAppUsingAssetSpec(TestStaticAppBase, unittest.TestCase):
+class TestStaticAppUsingAssetSpec(StaticAppBase, unittest.TestCase):
package = 'pyramid.tests.pkgs.static_assetspec'
class TestStaticAppNoSubpath(unittest.TestCase):
@@ -649,6 +649,10 @@ class AcceptContentTypeTest(unittest.TestCase):
from webtest import TestApp
self.testapp = TestApp(app)
+ def tearDown(self):
+ import pyramid.config
+ pyramid.config.global_registries.empty()
+
def test_ordering(self):
res = self.testapp.get('/hello', headers={'Accept': 'application/json; q=1.0, text/plain; q=0.9'}, status=200)
self.assertEqual(res.content_type, 'application/json')
diff --git a/pyramid/tests/test_scripts/test_pdistreport.py b/pyramid/tests/test_scripts/test_pdistreport.py
index a8316c0e5..e229667c5 100644
--- a/pyramid/tests/test_scripts/test_pdistreport.py
+++ b/pyramid/tests/test_scripts/test_pdistreport.py
@@ -1,5 +1,4 @@
import unittest
-from pyramid.tests.test_scripts import dummy
class TestPDistReportCommand(unittest.TestCase):
def _callFUT(self, **kw):
diff --git a/pyramid/tests/test_url.py b/pyramid/tests/test_url.py
index 9841c143e..bf1c514c5 100644
--- a/pyramid/tests/test_url.py
+++ b/pyramid/tests/test_url.py
@@ -611,7 +611,6 @@ class TestURLMethodsMixin(unittest.TestCase):
('pyramid.tests:static/foo.css', request, {}) )
def test_static_url_abspath_integration_with_staticurlinfo(self):
- import os
from pyramid.interfaces import IStaticURLInfo
from pyramid.config.views import StaticURLInfo
info = StaticURLInfo()
@@ -626,7 +625,6 @@ class TestURLMethodsMixin(unittest.TestCase):
'http://example.com:5432/absstatic/test_url.py')
def test_static_url_noscheme_uses_scheme_from_request(self):
- import os
from pyramid.interfaces import IStaticURLInfo
from pyramid.config.views import StaticURLInfo
info = StaticURLInfo()