Skip to content

Commit 49c9030

Browse files
author
Emanuele Palazzetti
committed
[pyramid] define a PyramidBase application
1 parent b71a40e commit 49c9030

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

tests/contrib/pyramid/test_pyramid.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717

1818
class PyramidBase(object):
19+
"""Base Pyramid test application"""
1920
instrument = False
2021

2122
def setUp(self):
@@ -38,6 +39,9 @@ def get_settings(self):
3839
def override_settings(self, settings):
3940
self.create_app(settings)
4041

42+
class PyramidTestCase(PyramidBase):
43+
"""Pyramid TestCase that includes tests for automatic instrumentation"""
44+
4145
def test_200(self):
4246
res = self.app.get('/', status=200)
4347
assert b'idx' in res.body
@@ -248,7 +252,7 @@ def includeme(config):
248252
pass
249253

250254

251-
class TestPyramid(PyramidBase):
255+
class TestPyramid(PyramidTestCase):
252256
instrument = True
253257

254258
def get_settings(self):

tests/contrib/pyramid/test_pyramid_autopatch.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@
1313
from ...test_tracer import get_dummy_tracer
1414
from ...util import override_global_tracer
1515

16-
#from .test_pyramid import PyramidBase, get_app, custom_exception_view
17-
from .test_pyramid import PyramidBase
16+
from .test_pyramid import PyramidTestCase
1817

1918

20-
class TestPyramidAutopatch(PyramidBase):
19+
class TestPyramidAutopatch(PyramidTestCase):
2120
instrument = False
2221

2322

24-
class TestPyramidExplicitTweens(PyramidBase):
23+
class TestPyramidExplicitTweens(PyramidTestCase):
2524
instrument = False
2625

2726
def get_settings(self):

0 commit comments

Comments
 (0)