コード例 #1
0
ファイル: test_buttons.py プロジェクト: MayankR/addons-server
 def get_button(self, t_mock, **kwargs):
     """Proxy for calling install_button."""
     template_mock = Mock()
     t_mock.return_value = template_mock
     install_button(self.context, self.addon, **kwargs)
     # Extract button from the kwargs from the first call.
     return template_mock.render.call_args[0][0]['button']
コード例 #2
0
ファイル: test_buttons.py プロジェクト: kewisch/addons-server
 def get_button(self, t_mock, **kwargs):
     """Proxy for calling install_button."""
     template_mock = Mock()
     t_mock.return_value = template_mock
     install_button(self.context, self.addon, **kwargs)
     # Extract button from the kwargs from the first call.
     return template_mock.render.call_args[0][0]['button']
コード例 #3
0
ファイル: test_buttons.py プロジェクト: yshshrm/addons-server
 def render(self, **kwargs):
     return PyQuery(install_button(self.context, self.addon, **kwargs))
コード例 #4
0
ファイル: test_buttons.py プロジェクト: yshshrm/addons-server
 def get_button(self, render_mock, **kwargs):
     """Proxy for calling install_button."""
     install_button(self.context, self.addon, **kwargs)
     # Extract button from the kwargs from the first call.
     return render_mock.call_args[0][1]['button']
コード例 #5
0
 def render(self, **kwargs):
     return PyQuery(install_button(self.context, self.addon, **kwargs))
コード例 #6
0
ファイル: test_buttons.py プロジェクト: Osmose/olympia
 def get_button(self, render_mock, **kwargs):
     """Proxy for calling install_button."""
     install_button(self.context, self.addon, **kwargs)
     # Extract button from the kwargs from the first call.
     return render_mock.call_args[0][1]['button']