Skip to content

Commit

Permalink
Api field is not required for Video imp
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoxaAntoxic committed Feb 1, 2024
1 parent 5348d88 commit da8406b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1026,8 +1026,10 @@ private static ImpMediaType impType(Imp imp) {

private static boolean isFullyPopulatedVideo(Video video) {
// These are just recommended video fields for XAPI
return video.getMimes() != null && video.getProtocols() != null && video.getMaxduration() != null
&& video.getLinearity() != null && video.getApi() != null;
return video.getMimes() != null
&& video.getProtocols() != null
&& video.getMaxduration() != null
&& video.getLinearity() != null;
}

private static String referer(Site site) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ public void makeHttpRequestsShouldCreateVideoRequestIfImpHasBannerAndVideoButAll
builder -> builder
.banner(Banner.builder().format(singletonList(Format.builder().w(300).h(250).build())).build())
.video(Video.builder().mimes(singletonList("mime1")).protocols(singletonList(1))
.maxduration(60).linearity(2).api(singletonList(3)).build()),
.maxduration(60).linearity(2).build()),
identity());

// when
Expand All @@ -730,7 +730,7 @@ public void makeHttpRequestsShouldCreateVideoRequestIfImpHasBannerAndVideoButAll
.containsOnly(tuple(
null, // banner is removed
Video.builder().mimes(singletonList("mime1")).protocols(singletonList(1))
.maxduration(60).linearity(2).api(singletonList(3)).build()));
.maxduration(60).linearity(2).build()));
}

@Test
Expand Down Expand Up @@ -3295,7 +3295,6 @@ public void makeHttpRequestsShouldFillImpExtWithFloorsWhenBothVideoAndBanner() {
.protocols(singletonList(1))
.maxduration(10)
.linearity(10)
.api(singletonList(12))
.build())
.banner(Banner.builder()
.format(singletonList(Format.builder().h(300).w(250).build()))
Expand Down Expand Up @@ -3611,7 +3610,7 @@ public void makeBidsShouldReturnVideoBidIfRequestImpHasBannerAndVideoButAllRequi
givenBidRequest(builder -> builder
.banner(Banner.builder().build())
.video(Video.builder().mimes(singletonList("mime1")).protocols(singletonList(1))
.maxduration(60).linearity(2).api(singletonList(3)).build())),
.maxduration(60).linearity(2).build())),
givenBidResponse(ONE));

// when
Expand Down

0 comments on commit da8406b

Please sign in to comment.