Ejemplo n.º 1
0
 def test_not_public_but_owner(self, sign):
     self.login('*****@*****.**')
     self.file.update(status=mkt.STATUS_PENDING)
     path = private_storage.url(self.file.file_path)
     res = self.client.get(self.url)
     self.assert3xx(res, path)
     assert not sign.called
Ejemplo n.º 2
0
 def preload_test_plan_url(self):
     if storage_is_remote():
         return private_storage.url(self.preload_test_plan_path)
     else:
         host = (settings.PRIVATE_MIRROR_URL if self.webapp.is_disabled
                 else settings.LOCAL_MIRROR_URL)
         return os.path.join(host, str(self.webapp.id), self.filename)
Ejemplo n.º 3
0
 def test_not_public_but_owner(self, sign):
     self.login('*****@*****.**')
     self.file.update(status=mkt.STATUS_PENDING)
     path = private_storage.url(self.file.file_path)
     res = self.client.get(self.url)
     self.assert3xx(res, path)
     assert not sign.called
Ejemplo n.º 4
0
 def test_disabled_but_owner(self):
     self.login('*****@*****.**')
     self.file.update(status=mkt.STATUS_DISABLED)
     copy_stored_file(self.packaged_app_path('mozball.zip'),
                      self.file.file_path,
                      src_storage=local_storage,
                      dst_storage=private_storage)
     path = private_storage.url(self.file.file_path)
     res = self.client.get(self.url)
     self.assert3xx(res, path)
Ejemplo n.º 5
0
 def test_disabled_but_owner(self):
     self.login('*****@*****.**')
     self.file.update(status=mkt.STATUS_DISABLED)
     copy_stored_file(self.packaged_app_path('mozball.zip'),
                      self.file.file_path,
                      src_storage=local_storage,
                      dst_storage=private_storage)
     path = private_storage.url(self.file.file_path)
     res = self.client.get(self.url)
     self.assert3xx(res, path)
Ejemplo n.º 6
0
 def test_disabled_but_admin(self):
     self.login("*****@*****.**")
     self.file.update(status=mkt.STATUS_DISABLED)
     copy_stored_file(
         self.packaged_app_path("mozball.zip"),
         self.file.file_path,
         src_storage=local_storage,
         dst_storage=private_storage,
     )
     path = private_storage.url(self.file.file_path)
     res = self.client.get(self.url)
     self.assert3xx(res, path)