コード例 #1
0
 def test_process_response_zipstr_no_packages(self):
     task = self._create_task()
     api = self._create_instance(task)
     response = DummyResponse()
     response.status_code = 200
     response.text = retrieve_result.format(zip=CreatePackageZipBuilder(
         "testing", api.api_version)(),
                                            extra="")
     resp = api._process_response(response)
     self.assertEqual(resp, {})
コード例 #2
0
ファイル: test_metadata.py プロジェクト: vazexqi/CumulusCI
 def test_process_response_zipstr_no_packages(self):
     task = self._create_task()
     api = self._create_instance(task)
     response = Response()
     response.status_code = 200
     response.raw = io.BytesIO(
         retrieve_result.format(
             zip=CreatePackageZipBuilder("testing",
                                         api.api_version).as_base64(),
             extra="",
         ).encode())
     resp = api._process_response(response)
     self.assertEqual(resp, {})
コード例 #3
0
 def _process_response_zipstr_no_packages(self):
     task = self._create_task()
     api = self._create_instance(task)
     response = DummyResponse
     response.status_code = 200
     response.content = deploy_result.format(
         zip = CreatePackageZipBuilder('testing'),
         extra = '',
     )
     resp = api._process_response(response)
     self.assertEquals(
         resp,
         {},
     )
コード例 #4
0
 def _get_api(self, path=None):
     package_zip = CreatePackageZipBuilder(self.options['package'],
                                           self.options['api_version'])
     return self.api_class(self, package_zip(), purge_on_delete=False)
コード例 #5
0
 def test_init__missing_api_version(self):
     with self.assertRaises(ValueError):
         CreatePackageZipBuilder("TestPackage", None)
コード例 #6
0
 def test_init__missing_name(self):
     with self.assertRaises(ValueError):
         CreatePackageZipBuilder(None, "43.0")
コード例 #7
0
 def _get_package_zip(self, path=None):
     return CreatePackageZipBuilder(
         self.options["package"], self.options["api_version"]
     ).as_base64()