From d72d00297947de3d446bb42d5f3168db5c5151c0 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Wed, 12 Feb 2014 18:18:23 -0500 Subject: [PATCH] Cleanup the WSGI app reference from the threadlocal state on every request. Change-Id: I22f93224047e2b6fd6692423cc27f85b6261f9f8 Closes-Bug: #1279461 --- pecan/core.py | 1 + pecan/tests/test_base.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pecan/core.py b/pecan/core.py index 4037a32..b9c88a1 100644 --- a/pecan/core.py +++ b/pecan/core.py @@ -598,3 +598,4 @@ class Pecan(object): del state.request del state.response del state.controller + del state.app diff --git a/pecan/tests/test_base.py b/pecan/tests/test_base.py index 95c09d1..5319013 100644 --- a/pecan/tests/test_base.py +++ b/pecan/tests/test_base.py @@ -972,7 +972,7 @@ class TestThreadLocalState(PecanTestCase): assert r.status_int == 200 assert r.body == b_('/') - assert list(state.__dict__.keys()) == ['app'] + assert state.__dict__ == {} class TestFileTypeExtensions(PecanTestCase):