Ejemplo n.º 1
0
 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'
     }
Ejemplo n.º 2
0
 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'
     }
Ejemplo n.º 3
0
 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
Ejemplo n.º 4
0
 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