class CloudVideoIntelligenceExampleDagsTest(TestDagGcpSystem): def __init__(self, method_name="runTest"): super().__init__(method_name, dag_id="example_gcp_video_intelligence", gcp_key=GCP_AI_KEY) self.helper = GCPVideoIntelligenceHelper() def setUp(self): self.gcp_authenticator.gcp_authenticate() try: self.helper.create_bucket() self.gcp_authenticator.gcp_revoke_authentication() finally: pass super().setUp() def tearDown(self): self.gcp_authenticator.gcp_authenticate() try: self.helper.delete_bucket() finally: self.gcp_authenticator.gcp_revoke_authentication() super().tearDown() def test_run_example_dag_spanner(self): self._run_dag()
class CloudVideoIntelligenceExampleDagsTest(SystemTest): helper = GCPVideoIntelligenceHelper() @provide_gcp_context(GCP_AI_KEY) def setUp(self): self.helper.create_bucket() super().setUp() @provide_gcp_context(GCP_AI_KEY) def tearDown(self): self.helper.delete_bucket() super().tearDown() @provide_gcp_context(GCP_AI_KEY) def test_run_example_dag_spanner(self): self.run_dag('example_gcp_video_intelligence', GCP_DAG_FOLDER)
def __init__(self, method_name="runTest"): super().__init__(method_name, dag_id="example_gcp_video_intelligence", gcp_key=GCP_AI_KEY) self.helper = GCPVideoIntelligenceHelper()