From 07d076001854b0939582131ac901bea7d58ab9a7 Mon Sep 17 00:00:00 2001 From: Avinash Kapre Date: Tue, 8 Oct 2024 15:18:41 +0530 Subject: [PATCH 1/4] UOE-11322: Forward displaymanager and displaymanagerver from app extension to pubmatic ssp --- adapters/pubmatic/pubmatic.go | 32 +++- adapters/pubmatic/pubmatic_test.go | 239 ++++++++++++++++++++++++++--- 2 files changed, 251 insertions(+), 20 deletions(-) diff --git a/adapters/pubmatic/pubmatic.go b/adapters/pubmatic/pubmatic.go index eea6babf34e..6c6f2626ce1 100644 --- a/adapters/pubmatic/pubmatic.go +++ b/adapters/pubmatic/pubmatic.go @@ -113,6 +113,9 @@ func (a *PubmaticAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *ad extractWrapperExtFromImp := true extractPubIDFromImp := true + //for display manager and version + displayManager, displayManagerVer := getDisplayManagerAndVer(request) + newReqExt, cookies, err := extractPubmaticExtFromRequest(request) if err != nil { return nil, []error{err} @@ -125,7 +128,7 @@ func (a *PubmaticAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *ad impFloorsMap := map[string][]float64{} for i := 0; i < len(request.Imp); i++ { - wrapperExtFromImp, pubIDFromImp, floors, err := parseImpressionObject(&request.Imp[i], extractWrapperExtFromImp, extractPubIDFromImp) + wrapperExtFromImp, pubIDFromImp, floors, err := parseImpressionObject(&request.Imp[i], extractWrapperExtFromImp, extractPubIDFromImp, displayManager, displayManagerVer) // If the parsing is failed, remove imp and add the error. if err != nil { errs = append(errs, err) @@ -383,7 +386,7 @@ func assignBannerWidthAndHeight(banner *openrtb2.Banner, w, h int64) *openrtb2.B } // parseImpressionObject parse the imp to get it ready to send to pubmatic -func parseImpressionObject(imp *openrtb2.Imp, extractWrapperExtFromImp, extractPubIDFromImp bool) (*pubmaticWrapperExt, string, []float64, error) { +func parseImpressionObject(imp *openrtb2.Imp, extractWrapperExtFromImp, extractPubIDFromImp bool, displayManager, displayManagerVer string) (*pubmaticWrapperExt, string, []float64, error) { var wrapExt *pubmaticWrapperExt var pubID string var floors []float64 @@ -397,6 +400,12 @@ func parseImpressionObject(imp *openrtb2.Imp, extractWrapperExtFromImp, extractP imp.Audio = nil } + // Populate imp.displaymanager and imp.displaymanagerver if the SDK failed to do it. + if imp.DisplayManager == "" && imp.DisplayManagerVer == "" && displayManager != "" && displayManagerVer != "" { + imp.DisplayManager = displayManager + imp.DisplayManagerVer = displayManagerVer + } + var bidderExt ExtImpBidderPubmatic if err := json.Unmarshal(imp.Ext, &bidderExt); err != nil { return wrapExt, pubID, floors, err @@ -854,3 +863,22 @@ func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server co } return bidder, nil } + +func getDisplayManagerAndVer(req *openrtb2.BidRequest) (string, string) { + if req.App == nil { + return "", "" + } + + if source, err := jsonparser.GetString(req.App.Ext, openrtb_ext.PrebidExtKey, "source"); err == nil { + if version, err := jsonparser.GetString(req.App.Ext, openrtb_ext.PrebidExtKey, "version"); err == nil { + return source, version + } + } + + if source, err := jsonparser.GetString(req.App.Ext, "source"); err == nil { + if version, err := jsonparser.GetString(req.App.Ext, "version"); err == nil { + return source, version + } + } + return "", "" +} diff --git a/adapters/pubmatic/pubmatic_test.go b/adapters/pubmatic/pubmatic_test.go index 78d495ba983..6639f29c35b 100644 --- a/adapters/pubmatic/pubmatic_test.go +++ b/adapters/pubmatic/pubmatic_test.go @@ -81,15 +81,22 @@ func TestParseImpressionObject(t *testing.T) { imp *openrtb2.Imp extractWrapperExtFromImp bool extractPubIDFromImp bool + displayManager string + displayManagerVer string + } + type want struct { + bidfloor float64 + impExt json.RawMessage + displayManager string + displayManagerVer string } tests := []struct { name string args args expectedWrapperExt *pubmaticWrapperExt expectedPublisherId string + want want wantErr bool - expectedBidfloor float64 - expectedImpExt json.RawMessage }{ { name: "imp.bidfloor empty and kadfloor set", @@ -99,8 +106,10 @@ func TestParseImpressionObject(t *testing.T) { Ext: json.RawMessage(`{"bidder":{"kadfloor":"0.12"}}`), }, }, - expectedBidfloor: 0.12, - expectedImpExt: json.RawMessage(nil), + want: want{ + bidfloor: 0.12, + impExt: json.RawMessage(nil), + }, }, { name: "imp.bidfloor set and kadfloor empty", @@ -111,8 +120,10 @@ func TestParseImpressionObject(t *testing.T) { Ext: json.RawMessage(`{"bidder":{}}`), }, }, - expectedBidfloor: 0.12, - expectedImpExt: json.RawMessage(nil), + want: want{ + bidfloor: 0.12, + impExt: json.RawMessage(nil), + }, }, { name: "imp.bidfloor set and kadfloor invalid", @@ -123,8 +134,10 @@ func TestParseImpressionObject(t *testing.T) { Ext: json.RawMessage(`{"bidder":{"kadfloor":"aaa"}}`), }, }, - expectedBidfloor: 0.12, - expectedImpExt: json.RawMessage(nil), + want: want{ + bidfloor: 0.12, + impExt: json.RawMessage(nil), + }, }, { name: "imp.bidfloor set and kadfloor set, higher imp.bidfloor", @@ -135,7 +148,10 @@ func TestParseImpressionObject(t *testing.T) { Ext: json.RawMessage(`{"bidder":{"kadfloor":"0.11"}}`), }, }, - expectedBidfloor: 0.12, + want: want{ + bidfloor: 0.12, + impExt: json.RawMessage(nil), + }, }, { name: "imp.bidfloor set and kadfloor set, higher kadfloor", @@ -146,8 +162,10 @@ func TestParseImpressionObject(t *testing.T) { Ext: json.RawMessage(`{"bidder":{"kadfloor":"0.13"}}`), }, }, - expectedBidfloor: 0.13, - expectedImpExt: json.RawMessage(nil), + want: want{ + bidfloor: 0.13, + impExt: json.RawMessage(nil), + }, }, { name: "kadfloor string set with whitespace", @@ -158,8 +176,10 @@ func TestParseImpressionObject(t *testing.T) { Ext: json.RawMessage(`{"bidder":{"kadfloor":" \t 0.13 "}}`), }, }, - expectedBidfloor: 0.13, - expectedImpExt: json.RawMessage(nil), + want: want{ + bidfloor: 0.13, + impExt: json.RawMessage(nil), + }, }, { name: "bidViewability Object is set in imp.ext.prebid.pubmatic, pass to imp.ext", @@ -169,7 +189,9 @@ func TestParseImpressionObject(t *testing.T) { Ext: json.RawMessage(`{"bidder":{"bidViewability":{"adSizes":{"728x90":{"createdAt":1679993940011,"rendered":20,"totalViewTime":424413,"viewed":17}},"adUnit":{"createdAt":1679993940011,"rendered":25,"totalViewTime":424413,"viewed":17}}}}`), }, }, - expectedImpExt: json.RawMessage(`{"bidViewability":{"adSizes":{"728x90":{"createdAt":1679993940011,"rendered":20,"totalViewTime":424413,"viewed":17}},"adUnit":{"createdAt":1679993940011,"rendered":25,"totalViewTime":424413,"viewed":17}}}`), + want: want{ + impExt: json.RawMessage(`{"bidViewability":{"adSizes":{"728x90":{"createdAt":1679993940011,"rendered":20,"totalViewTime":424413,"viewed":17}},"adUnit":{"createdAt":1679993940011,"rendered":25,"totalViewTime":424413,"viewed":17}}}`), + }, }, { name: "sendburl set in imp.ext.prebid.pubmatic, pass to imp.ext", @@ -179,17 +201,73 @@ func TestParseImpressionObject(t *testing.T) { Ext: json.RawMessage(`{"bidder":{"sendburl":true}}`), }, }, - expectedImpExt: json.RawMessage(`{"sendburl":true}`), + want: want{ + impExt: json.RawMessage(`{"sendburl":true}`), + }, + }, + { + name: "Populate imp.displaymanager and imp.displaymanagerver if both are empty in imp", + args: args{ + imp: &openrtb2.Imp{ + Video: &openrtb2.Video{}, + Ext: json.RawMessage(`{"bidder":{"kadfloor":"0.12"}}`), + }, + displayManager: "prebid-mobile", + displayManagerVer: "1.0.0", + }, + want: want{ + bidfloor: 0.12, + impExt: json.RawMessage(nil), + displayManager: "prebid-mobile", + displayManagerVer: "1.0.0", + }, + }, + { + name: "do not populate imp.displaymanager and imp.displaymanagerver in imp if only displaymanager or displaymanagerver is empty in args", + args: args{ + imp: &openrtb2.Imp{ + Video: &openrtb2.Video{}, + Ext: json.RawMessage(`{"bidder":{"kadfloor":"0.12"}}`), + DisplayManagerVer: "1.0.0", + }, + displayManager: "prebid-mobile", + displayManagerVer: "1.0.0", + }, + want: want{ + bidfloor: 0.12, + impExt: json.RawMessage(nil), + displayManagerVer: "1.0.0", + }, + }, + { + name: "do not populate imp.displaymanager and imp.displaymanagerver if already present in imp", + args: args{ + imp: &openrtb2.Imp{ + Video: &openrtb2.Video{}, + Ext: json.RawMessage(`{"bidder":{"kadfloor":"0.12"}}`), + DisplayManager: "prebid-mobile", + DisplayManagerVer: "1.0.0", + }, + displayManager: "prebid-android", + displayManagerVer: "2.0.0", + }, + want: want{ + bidfloor: 0.12, + impExt: json.RawMessage(nil), + displayManager: "prebid-mobile", + displayManagerVer: "1.0.0", + }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - receivedWrapperExt, receivedPublisherId, _, err := parseImpressionObject(tt.args.imp, tt.args.extractWrapperExtFromImp, tt.args.extractPubIDFromImp) + receivedWrapperExt, receivedPublisherId, _, err := parseImpressionObject(tt.args.imp, tt.args.extractWrapperExtFromImp, tt.args.extractPubIDFromImp, tt.args.displayManager, tt.args.displayManagerVer) assert.Equal(t, tt.wantErr, err != nil) assert.Equal(t, tt.expectedWrapperExt, receivedWrapperExt) assert.Equal(t, tt.expectedPublisherId, receivedPublisherId) - assert.Equal(t, tt.expectedBidfloor, tt.args.imp.BidFloor) - assert.Equal(t, tt.expectedImpExt, tt.args.imp.Ext) + assert.Equal(t, tt.want.bidfloor, tt.args.imp.BidFloor) + assert.Equal(t, tt.want.impExt, tt.args.imp.Ext) + assert.Equal(t, tt.want.displayManager, tt.args.imp.DisplayManager) }) } } @@ -1499,3 +1577,128 @@ func TestTrimSuffixWithPattern(t *testing.T) { }) } } + +func TestGetDisplayManagerAndVer(t *testing.T) { + type args struct { + req *openrtb2.BidRequest + } + type want struct { + displayManager string + displayManagerVer string + } + tests := []struct { + name string + args args + want want + }{ + { + name: "request app object is nils", + args: args{ + req: &openrtb2.BidRequest{ + App: nil, + }, + }, + want: want{ + displayManager: "", + displayManagerVer: "", + }, + }, + { + name: "request app object is not nil but app.ext has no source and version", + args: args{ + req: &openrtb2.BidRequest{ + App: &openrtb2.App{ + Name: "AutoScout24", + Ext: json.RawMessage(`{}`), + }, + }, + }, + want: want{ + displayManager: "", + displayManagerVer: "", + }, + }, + { + name: "request app object is not nil and app.ext has source and version", + args: args{ + req: &openrtb2.BidRequest{ + App: &openrtb2.App{ + Name: "AutoScout24", + Ext: json.RawMessage(`{"source":"prebid-mobile","version":"1.0.0"}`), + }, + }, + }, + want: want{ + displayManager: "prebid-mobile", + displayManagerVer: "1.0.0", + }, + }, + { + name: "request app object is not nil and app.ext.prebid has source and version", + args: args{ + req: &openrtb2.BidRequest{ + App: &openrtb2.App{ + Name: "AutoScout24", + Ext: json.RawMessage(`{"prebid":{"source":"prebid-mobile","version":"1.0.0"}}`), + }, + }, + }, + want: want{ + displayManager: "prebid-mobile", + displayManagerVer: "1.0.0", + }, + }, + { + name: "request app object is not nil and app.ext has only version", + args: args{ + req: &openrtb2.BidRequest{ + App: &openrtb2.App{ + Name: "AutoScout24", + Ext: json.RawMessage(`{"version":"1.0.0"}`), + }, + }, + }, + want: want{ + displayManager: "", + displayManagerVer: "", + }, + }, + { + name: "request app object is not nil and app.ext has only source", + args: args{ + req: &openrtb2.BidRequest{ + App: &openrtb2.App{ + Name: "AutoScout24", + Ext: json.RawMessage(`{"source":"prebid-mobile"}`), + }, + }, + }, + want: want{ + displayManager: "", + displayManagerVer: "", + }, + }, + { + name: "request app object is not nil and both app.ext and app.ext.prebid have source and version", + args: args{ + req: &openrtb2.BidRequest{ + App: &openrtb2.App{ + Name: "AutoScout24", + Ext: json.RawMessage(`{"source":"prebid-mobile-android","version":"2.0.0","prebid":{"source":"prebid-mobile","version":"1.0.0"}}`), + }, + }, + }, + want: want{ + displayManager: "prebid-mobile", + displayManagerVer: "1.0.0", + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + displayManager, displayManagerVer := getDisplayManagerAndVer(tt.args.req) + assert.Equal(t, tt.want.displayManager, displayManager) + assert.Equal(t, tt.want.displayManagerVer, displayManagerVer) + }) + } +} From b0c7fe562a188f54b123b0d9bcd4fd71f3f45b55 Mon Sep 17 00:00:00 2001 From: Avinash Kapre Date: Wed, 9 Oct 2024 16:38:05 +0530 Subject: [PATCH 2/4] test case name update --- adapters/pubmatic/pubmatic_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adapters/pubmatic/pubmatic_test.go b/adapters/pubmatic/pubmatic_test.go index 6639f29c35b..d3901998539 100644 --- a/adapters/pubmatic/pubmatic_test.go +++ b/adapters/pubmatic/pubmatic_test.go @@ -223,7 +223,7 @@ func TestParseImpressionObject(t *testing.T) { }, }, { - name: "do not populate imp.displaymanager and imp.displaymanagerver in imp if only displaymanager or displaymanagerver is empty in args", + name: "do not populate imp.displaymanager and imp.displaymanagerver in imp if only displaymanager or displaymanagerver is present in args", args: args{ imp: &openrtb2.Imp{ Video: &openrtb2.Video{}, @@ -1592,7 +1592,7 @@ func TestGetDisplayManagerAndVer(t *testing.T) { want want }{ { - name: "request app object is nils", + name: "request app object is nil", args: args{ req: &openrtb2.BidRequest{ App: nil, From f971d9bc6cf16800a4166ba4cae21dce0e8c6405 Mon Sep 17 00:00:00 2001 From: Avinash Kapre Date: Wed, 9 Oct 2024 16:47:23 +0530 Subject: [PATCH 3/4] comment --- adapters/pubmatic/pubmatic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapters/pubmatic/pubmatic.go b/adapters/pubmatic/pubmatic.go index 6c6f2626ce1..63c86856885 100644 --- a/adapters/pubmatic/pubmatic.go +++ b/adapters/pubmatic/pubmatic.go @@ -113,7 +113,6 @@ func (a *PubmaticAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *ad extractWrapperExtFromImp := true extractPubIDFromImp := true - //for display manager and version displayManager, displayManagerVer := getDisplayManagerAndVer(request) newReqExt, cookies, err := extractPubmaticExtFromRequest(request) @@ -864,6 +863,7 @@ func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server co return bidder, nil } +// getDisplayManagerAndVer returns the display manager and version from the request.app.ext or request.app.prebid.ext source and version func getDisplayManagerAndVer(req *openrtb2.BidRequest) (string, string) { if req.App == nil { return "", "" From 07981d2b36e59d2b27601f53689b8568e2da1a6f Mon Sep 17 00:00:00 2001 From: Avinash Kapre Date: Thu, 10 Oct 2024 10:50:44 +0530 Subject: [PATCH 4/4] review comment --- adapters/pubmatic/pubmatic.go | 19 +++--- adapters/pubmatic/pubmatic_test.go | 93 ++++++++++++++++-------------- 2 files changed, 58 insertions(+), 54 deletions(-) diff --git a/adapters/pubmatic/pubmatic.go b/adapters/pubmatic/pubmatic.go index 63c86856885..27ac67255ba 100644 --- a/adapters/pubmatic/pubmatic.go +++ b/adapters/pubmatic/pubmatic.go @@ -113,7 +113,10 @@ func (a *PubmaticAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *ad extractWrapperExtFromImp := true extractPubIDFromImp := true - displayManager, displayManagerVer := getDisplayManagerAndVer(request) + displayManager, displayManagerVer := "", "" + if request.App != nil && request.App.Ext != nil { + displayManager, displayManagerVer = getDisplayManagerAndVer(request.App) + } newReqExt, cookies, err := extractPubmaticExtFromRequest(request) if err != nil { @@ -864,19 +867,15 @@ func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server co } // getDisplayManagerAndVer returns the display manager and version from the request.app.ext or request.app.prebid.ext source and version -func getDisplayManagerAndVer(req *openrtb2.BidRequest) (string, string) { - if req.App == nil { - return "", "" - } - - if source, err := jsonparser.GetString(req.App.Ext, openrtb_ext.PrebidExtKey, "source"); err == nil { - if version, err := jsonparser.GetString(req.App.Ext, openrtb_ext.PrebidExtKey, "version"); err == nil { +func getDisplayManagerAndVer(app *openrtb2.App) (string, string) { + if source, err := jsonparser.GetString(app.Ext, openrtb_ext.PrebidExtKey, "source"); err == nil && source != "" { + if version, err := jsonparser.GetString(app.Ext, openrtb_ext.PrebidExtKey, "version"); err == nil && version != "" { return source, version } } - if source, err := jsonparser.GetString(req.App.Ext, "source"); err == nil { - if version, err := jsonparser.GetString(req.App.Ext, "version"); err == nil { + if source, err := jsonparser.GetString(app.Ext, "source"); err == nil && source != "" { + if version, err := jsonparser.GetString(app.Ext, "version"); err == nil && version != "" { return source, version } } diff --git a/adapters/pubmatic/pubmatic_test.go b/adapters/pubmatic/pubmatic_test.go index d3901998539..981a8025dd2 100644 --- a/adapters/pubmatic/pubmatic_test.go +++ b/adapters/pubmatic/pubmatic_test.go @@ -268,6 +268,7 @@ func TestParseImpressionObject(t *testing.T) { assert.Equal(t, tt.want.bidfloor, tt.args.imp.BidFloor) assert.Equal(t, tt.want.impExt, tt.args.imp.Ext) assert.Equal(t, tt.want.displayManager, tt.args.imp.DisplayManager) + assert.Equal(t, tt.want.displayManagerVer, tt.args.imp.DisplayManagerVer) }) } } @@ -1580,7 +1581,7 @@ func TestTrimSuffixWithPattern(t *testing.T) { func TestGetDisplayManagerAndVer(t *testing.T) { type args struct { - req *openrtb2.BidRequest + app *openrtb2.App } type want struct { displayManager string @@ -1591,26 +1592,13 @@ func TestGetDisplayManagerAndVer(t *testing.T) { args args want want }{ - { - name: "request app object is nil", - args: args{ - req: &openrtb2.BidRequest{ - App: nil, - }, - }, - want: want{ - displayManager: "", - displayManagerVer: "", - }, - }, { name: "request app object is not nil but app.ext has no source and version", args: args{ - req: &openrtb2.BidRequest{ - App: &openrtb2.App{ - Name: "AutoScout24", - Ext: json.RawMessage(`{}`), - }, + + app: &openrtb2.App{ + Name: "AutoScout24", + Ext: json.RawMessage(`{}`), }, }, want: want{ @@ -1621,11 +1609,10 @@ func TestGetDisplayManagerAndVer(t *testing.T) { { name: "request app object is not nil and app.ext has source and version", args: args{ - req: &openrtb2.BidRequest{ - App: &openrtb2.App{ - Name: "AutoScout24", - Ext: json.RawMessage(`{"source":"prebid-mobile","version":"1.0.0"}`), - }, + + app: &openrtb2.App{ + Name: "AutoScout24", + Ext: json.RawMessage(`{"source":"prebid-mobile","version":"1.0.0"}`), }, }, want: want{ @@ -1636,11 +1623,9 @@ func TestGetDisplayManagerAndVer(t *testing.T) { { name: "request app object is not nil and app.ext.prebid has source and version", args: args{ - req: &openrtb2.BidRequest{ - App: &openrtb2.App{ - Name: "AutoScout24", - Ext: json.RawMessage(`{"prebid":{"source":"prebid-mobile","version":"1.0.0"}}`), - }, + app: &openrtb2.App{ + Name: "AutoScout24", + Ext: json.RawMessage(`{"prebid":{"source":"prebid-mobile","version":"1.0.0"}}`), }, }, want: want{ @@ -1651,11 +1636,9 @@ func TestGetDisplayManagerAndVer(t *testing.T) { { name: "request app object is not nil and app.ext has only version", args: args{ - req: &openrtb2.BidRequest{ - App: &openrtb2.App{ - Name: "AutoScout24", - Ext: json.RawMessage(`{"version":"1.0.0"}`), - }, + app: &openrtb2.App{ + Name: "AutoScout24", + Ext: json.RawMessage(`{"version":"1.0.0"}`), }, }, want: want{ @@ -1666,11 +1649,35 @@ func TestGetDisplayManagerAndVer(t *testing.T) { { name: "request app object is not nil and app.ext has only source", args: args{ - req: &openrtb2.BidRequest{ - App: &openrtb2.App{ - Name: "AutoScout24", - Ext: json.RawMessage(`{"source":"prebid-mobile"}`), - }, + app: &openrtb2.App{ + Name: "AutoScout24", + Ext: json.RawMessage(`{"source":"prebid-mobile"}`), + }, + }, + want: want{ + displayManager: "", + displayManagerVer: "", + }, + }, + { + name: "request app object is not nil and app.ext have empty source but version is present", + args: args{ + app: &openrtb2.App{ + Name: "AutoScout24", + Ext: json.RawMessage(`{"source":"", "version":"1.0.0"}`), + }, + }, + want: want{ + displayManager: "", + displayManagerVer: "", + }, + }, + { + name: "request app object is not nil and app.ext have empty version but source is present", + args: args{ + app: &openrtb2.App{ + Name: "AutoScout24", + Ext: json.RawMessage(`{"source":"prebid-mobile", "version":""}`), }, }, want: want{ @@ -1681,11 +1688,9 @@ func TestGetDisplayManagerAndVer(t *testing.T) { { name: "request app object is not nil and both app.ext and app.ext.prebid have source and version", args: args{ - req: &openrtb2.BidRequest{ - App: &openrtb2.App{ - Name: "AutoScout24", - Ext: json.RawMessage(`{"source":"prebid-mobile-android","version":"2.0.0","prebid":{"source":"prebid-mobile","version":"1.0.0"}}`), - }, + app: &openrtb2.App{ + Name: "AutoScout24", + Ext: json.RawMessage(`{"source":"prebid-mobile-android","version":"2.0.0","prebid":{"source":"prebid-mobile","version":"1.0.0"}}`), }, }, want: want{ @@ -1696,7 +1701,7 @@ func TestGetDisplayManagerAndVer(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - displayManager, displayManagerVer := getDisplayManagerAndVer(tt.args.req) + displayManager, displayManagerVer := getDisplayManagerAndVer(tt.args.app) assert.Equal(t, tt.want.displayManager, displayManager) assert.Equal(t, tt.want.displayManagerVer, displayManagerVer) })