tests: fix test per appinfo/configure changes
This commit is contained in:
parent
2b3d69a379
commit
013d921772
|
@ -1528,6 +1528,14 @@ class TestMasterView(WebTestCase):
|
||||||
get_index_url=MagicMock(return_value='/appinfo/'),
|
get_index_url=MagicMock(return_value='/appinfo/'),
|
||||||
configure_get_simple_settings=MagicMock(return_value=settings)):
|
configure_get_simple_settings=MagicMock(return_value=settings)):
|
||||||
|
|
||||||
|
# nb. appinfo/configure template requires menu_handlers
|
||||||
|
original_context = view.configure_get_context
|
||||||
|
def get_context(**kw):
|
||||||
|
kw = original_context(**kw)
|
||||||
|
kw['menu_handlers'] = []
|
||||||
|
return kw
|
||||||
|
with patch.object(view, 'configure_get_context', new=get_context):
|
||||||
|
|
||||||
# get the form page
|
# get the form page
|
||||||
response = view.configure(session=self.session)
|
response = view.configure(session=self.session)
|
||||||
self.assertIsInstance(response, Response)
|
self.assertIsInstance(response, Response)
|
||||||
|
|
Loading…
Reference in a new issue