diff options
| author | Chris McDonough <chrism@plope.com> | 2012-11-21 07:27:40 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-11-21 07:27:40 -0500 |
| commit | d91dc7bd96bdc8638c52e4b0685612237cf13578 (patch) | |
| tree | b1419ef6c8d44c085cfa0a035cc4bdb9201432a2 | |
| parent | a3810e706bce12c0195737c2713362795613e2ae (diff) | |
| download | pyramid-d91dc7bd96bdc8638c52e4b0685612237cf13578.tar.gz pyramid-d91dc7bd96bdc8638c52e4b0685612237cf13578.tar.bz2 pyramid-d91dc7bd96bdc8638c52e4b0685612237cf13578.zip | |
add an integration test for the eventonly behavior
| -rw-r--r-- | pyramid/tests/test_integration.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pyramid/tests/test_integration.py b/pyramid/tests/test_integration.py index 9a8f842aa..bb33c5c27 100644 --- a/pyramid/tests/test_integration.py +++ b/pyramid/tests/test_integration.py @@ -174,6 +174,18 @@ class TestStaticAppBase(IntegrationBase): def test_oob_slash(self): self.testapp.get('/%2F/test_integration.py', status=404) +class TestEventOnlySubscribers(IntegrationBase, unittest.TestCase): + package = 'pyramid.tests.pkgs.eventonly' + + def test_sendfoo(self): + res = self.testapp.get('/sendfoo', status=200) + self.assertEqual(sorted(res.body.split()), ['foo', 'fooyup']) + + def test_sendfoobar(self): + res = self.testapp.get('/sendfoobar', status=200) + self.assertEqual(sorted(res.body.split()), + ['foobar', 'foobar2', 'foobaryup', 'foobaryup2']) + class TestStaticAppUsingAbsPath(TestStaticAppBase, unittest.TestCase): package = 'pyramid.tests.pkgs.static_abspath' |
