This repository was archived by the owner on Mar 31, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44import types
55
66import simplejson as json
7+ from mock import patch
78from nose .tools import eq_
89
910from helper import TestCase
@@ -965,14 +966,24 @@ def test_origin_path_trailing_slash(self):
965966 self .assert_failed (with_errors = True )
966967
967968 def test_origin_allowed (self ):
968- self .make_privileged ()
969- self .data ["origin" ] = "app://marketplace.firefox.com"
970- self .analyze ()
971- self .assert_silent ()
969+ for origin in ("app://marketplace.firefox.com" ,
970+ "app://gamescentre.mozilla.com" ,
971+ "app://mozilla.org" ,
972+ "app://system.gaiamobile.org" ):
973+ self .make_privileged ()
974+ self .data ["origin" ] = origin
975+ self .analyze ()
976+ self .assert_silent ()
972977
978+ @patch ("appvalidator.specs.webapps.BANNED_ORIGINS" , [
979+ "gamescentre.mozilla.com" ,
980+ "firefox.com" ,
981+ ])
973982 def test_origin_banned (self ):
974- for origin in ("app://system.gaiamobile.org" , "app://mozilla.org" ):
975- self .make_privileged ()
983+ self .make_privileged ()
984+
985+ for origin in ("app://gamescentre.mozilla.com" ,
986+ "app://theconsoleisdead.firefox.com" ):
976987 self .data ["origin" ] = origin
977988 self .analyze ()
978989 self .assert_failed (with_errors = True )
You can’t perform that action at this time.
0 commit comments