12
12
)
13
13
14
14
15
+ @patch .multiple (
16
+ 'v03_pipeline.lib.tasks.dataproc.create_dataproc_cluster.Env' ,
17
+ GCLOUD_PROJECT = 'proj' ,
18
+ GCLOUD_REGION = 'us-a' ,
19
+ GCLOUD_ZONE = 'us-a-1' ,
20
+ )
15
21
@patch (
16
22
'v03_pipeline.lib.tasks.dataproc.create_dataproc_cluster.get_service_account_credentials' ,
17
23
return_value = SimpleNamespace (
@@ -26,7 +32,7 @@ class CreateDataprocClusterTaskTest(unittest.TestCase):
26
32
def test_dataset_type_unsupported (
27
33
self ,
28
34
mock_cluster_controller : Mock ,
29
- _ : Mock ,
35
+ * _ : Mock ,
30
36
) -> None :
31
37
task = CreateDataprocClusterTask (
32
38
reference_genome = ReferenceGenome .GRCh38 ,
@@ -38,7 +44,7 @@ def test_dataset_type_unsupported(
38
44
def test_spinup_cluster_already_exists_failed (
39
45
self ,
40
46
mock_cluster_controller : Mock ,
41
- _ : Mock ,
47
+ * _ : Mock ,
42
48
) -> None :
43
49
mock_client = mock_cluster_controller .return_value
44
50
mock_client .get_cluster .return_value = SimpleNamespace (
@@ -61,7 +67,7 @@ def test_spinup_cluster_already_exists_failed(
61
67
def test_spinup_cluster_already_exists_success (
62
68
self ,
63
69
mock_cluster_controller : Mock ,
64
- _ : Mock ,
70
+ * _ : Mock ,
65
71
) -> None :
66
72
mock_client = mock_cluster_controller .return_value
67
73
mock_client .get_cluster .return_value = SimpleNamespace (
@@ -85,7 +91,7 @@ def test_spinup_cluster_doesnt_exist_failed(
85
91
self ,
86
92
mock_logger : Mock ,
87
93
mock_cluster_controller : Mock ,
88
- _ : Mock ,
94
+ * _ : Mock ,
89
95
) -> None :
90
96
mock_client = mock_cluster_controller .return_value
91
97
mock_client .get_cluster .side_effect = google .api_core .exceptions .NotFound (
@@ -111,7 +117,7 @@ def test_spinup_cluster_doesnt_exist_success(
111
117
self ,
112
118
mock_logger : Mock ,
113
119
mock_cluster_controller : Mock ,
114
- _ : Mock ,
120
+ * _ : Mock ,
115
121
) -> None :
116
122
mock_client = mock_cluster_controller .return_value
117
123
mock_client .get_cluster .side_effect = google .api_core .exceptions .NotFound (
0 commit comments