@@ -294,6 +294,46 @@ def test_build_list_does_not_include_external_versions(self):
294
294
reverse ('builds_project_list' , args = [self .pip .slug ]),
295
295
)
296
296
self .assertEqual (response .status_code , 200 )
297
-
298
297
self .assertNotIn (external_version_build , response .context ['build_qs' ])
299
298
self .assertNotIn (external_version_build , response .context ['active_builds' ])
299
+
300
+ def test_pr_build_list_includes_pr_version_builds (self ):
301
+ pr_version = get (
302
+ Version ,
303
+ project = self .pip ,
304
+ active = True ,
305
+ type = PULL_REQUEST ,
306
+ )
307
+ pr_version_build = get (
308
+ Build ,
309
+ project = self .pip ,
310
+ version = pr_version
311
+ )
312
+ response = self .client .get (
313
+ reverse ('pr_builds_project_list' , args = [self .pip .slug ]),
314
+ )
315
+
316
+ self .assertEqual (response .status_code , 200 )
317
+ self .assertIn (pr_version_build , response .context ['build_qs' ])
318
+
319
+ def test_pr_build_list_does_not_include_internal_version_builds (self ):
320
+ internal_version = get (
321
+ Version ,
322
+ project = self .pip ,
323
+ active = True ,
324
+ type = BRANCH ,
325
+ )
326
+ internal_version_build = get (
327
+ Build ,
328
+ project = self .pip ,
329
+ version = internal_version
330
+ )
331
+ response = self .client .get (
332
+ reverse ('pr_builds_project_list' , args = [self .pip .slug ]),
333
+ )
334
+
335
+ self .assertEqual (response .status_code , 200 )
336
+ self .assertNotIn (
337
+ internal_version_build ,
338
+ response .context ['build_qs' ]
339
+ )
0 commit comments