[FIX] MockRequestCase

bzr revid: al@openerp.com-20131203214705-6tz63yqo9kk73ztx
This commit is contained in:
Antony Lesuisse 2013-12-03 22:47:05 +01:00
parent 4c45774b6d
commit d5aec362a9
1 changed files with 2 additions and 3 deletions

View File

@ -8,10 +8,9 @@ from openerp import http
class MockRequestCase(unittest2.TestCase):
def setUp(self):
super(MockRequestCase, self).setUp()
self.tmp_req = http.set_request(mock.Mock())
self.tmp_req.__enter__()
http._request_stack.push(mock.Mock())
def tearDown(self):
self.tmp_req.__exit__(None, None, None)
http._request_stack.pop()
super(MockRequestCase, self).tearDown()