@@ -178,7 +178,7 @@ def assert_valid_yaml(file):
178178 pytest .fail (f"unable to parse YAML: { file } " )
179179
180180
181- def test_library_blunderbuss ():
181+ def test_library_blunderbuss_single_codeowner ():
182182 t = templates .Templates (PYTHON_LIBRARY / ".github" )
183183 result = t .render (
184184 "blunderbuss.yml" ,
@@ -188,6 +188,7 @@ def test_library_blunderbuss():
188188 config = yaml .safe_load (result )
189189 assert "googleapis/python-core-client-libraries" not in config ["assign_issues" ]
190190 assert "googleapis/foo" in config ["assign_issues" ]
191+ assert "googleapis/foo" in config ["assign_prs" ]
191192 assert (
192193 "googleapis/python-samples-reviewers" in config ["assign_issues_by" ][0 ]["to" ]
193194 )
@@ -196,6 +197,28 @@ def test_library_blunderbuss():
196197 pytest .fail (f"unable to parse YAML: { result } " )
197198
198199
200+ def test_library_blunderbuss_multiple_codeowner ():
201+ t = templates .Templates (PYTHON_LIBRARY / ".github" )
202+ result = t .render (
203+ "blunderbuss.yml" ,
204+ metadata = {"repo" : {"codeowner_team" : "googleapis/foo googleapis/bar" }},
205+ ).read_text ()
206+ try :
207+ config = yaml .safe_load (result )
208+ assert "googleapis/python-core-client-libraries" not in config ["assign_issues" ]
209+ assert "googleapis/foo" in config ["assign_issues" ]
210+ assert "googleapis/bar" in config ["assign_issues" ]
211+ assert "googleapis/foo" in config ["assign_prs" ]
212+ assert "googleapis/bar" in config ["assign_prs" ]
213+ assert (
214+ "googleapis/python-samples-reviewers" in config ["assign_issues_by" ][0 ]["to" ]
215+ )
216+ assert "googleapis/foo" in config ["assign_issues_by" ][0 ]["to" ]
217+ assert "googleapis/bar" in config ["assign_issues_by" ][0 ]["to" ]
218+ except yaml .YAMLError :
219+ pytest .fail (f"unable to parse YAML: { result } " )
220+
221+
199222def test_library_blunderbuss_no_codeowner ():
200223 t = templates .Templates (PYTHON_LIBRARY / ".github" )
201224 result = t .render (
0 commit comments