def test_big_install_button(self, flags_mock, install_button_mock): big_install_button(self.context, self.addon) assert install_button_mock.call_args[1] == { 'detailed': True, 'show_download_anyway': True, 'size': 'prominent' }
def test_big_install_button_xss(self, flags_mock, button_mock): # Make sure there's no xss in statusflags. button_mock.return_value = jinja2.Markup('<b>button</b>') flags_mock.return_value = xss = '<script src="x.js">' s = big_install_button(self.context, self.addon) assert xss not in s, s