From d91dc7bd96bdc8638c52e4b0685612237cf13578 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 21 Nov 2012 07:27:40 -0500 Subject: add an integration test for the eventonly behavior --- pyramid/tests/test_integration.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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' -- cgit v1.2.3