Ejemplo n.º 1
0
 def test_verify_source(self):
     with self.assertRaisesRegex(AirflowException,
                                 "The source could not be determined."):
         BuildProcessor(body={
             "source": {
                 "storageSource": {},
                 "repoSource": {}
             }
         }).process_body()
Ejemplo n.º 2
0
 def test_convert_repo_url_to_storage_dict_invalid(self, url):
     body = {"source": {"repoSource": url}}
     with self.assertRaisesRegex(AirflowException, "Invalid URL."):
         BuildProcessor(body=body).process_body()
Ejemplo n.º 3
0
 def test_convert_repo_url_to_dict_valid(self, url, expected_dict):
     body = {"source": {"repoSource": url}}
     body = BuildProcessor(body=body).process_body()
     self.assertEqual(body["source"]["repoSource"], expected_dict)
Ejemplo n.º 4
0
    def test_do_nothing(self, source_key):
        body = {"source": {source_key: {}}}
        expected_body = deepcopy(body)

        BuildProcessor(body=body).process_body()
        self.assertEqual(body, expected_body)