Пример #1
0
 def test_is_broken(self):
     zip = SafeUnzip(self.packaged_app_path('signed.zip'))
     zip.is_valid()
     sf_re = re.compile('^META\-INF/(\w+)\.sf$')
     for info in zip.info:
         if sf_re.match(info.filename):
             info.filename = 'META-INF/foo.foo'
             break
     assert not zip.is_signed()
Пример #2
0
 def test_is_broken(self):
     zip = SafeUnzip(self.packaged_app_path('signed.zip'))
     zip.is_valid()
     sf_re = re.compile('^META\-INF/(\w+)\.sf$')
     for info in zip.info:
         if sf_re.match(info.filename):
             info.filename = 'META-INF/foo.foo'
             break
     assert not zip.is_signed()
Пример #3
0
 def test_is_secure(self):
     zip = SafeUnzip(self.packaged_app_path('signed.zip'))
     zip.is_valid()
     assert zip.is_signed()
Пример #4
0
 def test_not_secure(self):
     zip = SafeUnzip(self.packaged_app_path('mozball.zip'))
     zip.is_valid()
     assert not zip.is_signed()
Пример #5
0
 def test_is_secure(self):
     zip = SafeUnzip(self.packaged_app_path('signed.zip'))
     zip.is_valid()
     assert zip.is_signed()
Пример #6
0
 def test_is_broken(self):
     zip = SafeUnzip(self.xpi_path('signed'))
     zip.is_valid()
     zip.info[2].filename = 'META-INF/foo.sf'
     assert not zip.is_signed()
Пример #7
0
 def test_not_secure(self):
     zip = SafeUnzip(self.packaged_app_path('mozball.zip'))
     zip.is_valid()
     assert not zip.is_signed()
Пример #8
0
 def test_is_secure(self):
     zip = SafeUnzip(self.xpi_path('signed'))
     zip.is_valid()
     assert zip.is_signed()
Пример #9
0
 def test_not_secure(self):
     zip = SafeUnzip(self.xpi_path('extension'))
     zip.is_valid()
     assert not zip.is_signed()
Пример #10
0
 def test_is_broken(self):
     zip = SafeUnzip(self.xpi_path('signed'))
     zip.is_valid()
     zip.info[2].filename = 'META-INF/foo.sf'
     assert not zip.is_signed()
Пример #11
0
 def test_is_secure(self):
     zip = SafeUnzip(self.xpi_path('signed'))
     zip.is_valid()
     assert zip.is_signed()
Пример #12
0
 def test_not_secure(self):
     zip = SafeUnzip(self.xpi_path('extension'))
     zip.is_valid()
     assert not zip.is_signed()