|
| 1 | +package openrtb |
| 2 | + |
| 3 | +var testFixtures = struct { |
| 4 | + simpleBanner []byte |
| 5 | + expandableCreative []byte |
| 6 | +}{ |
| 7 | + simpleBanner: []byte(` |
| 8 | +{ |
| 9 | + "id":"1234534625254", |
| 10 | + "at":2, |
| 11 | + "tmax":120, |
| 12 | + "imp":[ |
| 13 | + { |
| 14 | + "id":"1", |
| 15 | + "banner":{ |
| 16 | + "w":300, |
| 17 | + "h":250, |
| 18 | + "pos":1, |
| 19 | + "battr":[13] |
| 20 | + } |
| 21 | + } |
| 22 | + ], |
| 23 | + "badv":["company1.com","company2.com"], |
| 24 | + "site":{ |
| 25 | + "id":"234563", |
| 26 | + "name":"Site ABCD", |
| 27 | + "domain":"siteabcd.com", |
| 28 | + "cat":["IAB2-1", "IAB2-2"], |
| 29 | + "privacypolicy":1, |
| 30 | + "page":"http://siteabcd.com/page.htm", |
| 31 | + "ref":"http://referringsite.com/referringpage.htm", |
| 32 | + "publisher":{ |
| 33 | + "id":"pub12345", |
| 34 | + "name":"Publisher A" |
| 35 | + }, |
| 36 | + "content":{ |
| 37 | + "keywords":["keyword a","keyword b","keyword c"] |
| 38 | + } |
| 39 | + }, |
| 40 | + "device":{ |
| 41 | + "ip":"64.124.253.1", |
| 42 | + "ua":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16", |
| 43 | + "os":"OS X", |
| 44 | + "flashver":"10.1", |
| 45 | + "js":1 |
| 46 | + }, |
| 47 | + "user":{ |
| 48 | + "id":"45asdf987656789adfad4678rew656789", |
| 49 | + "buyeruid":"5df678asd8987656asdf78987654" |
| 50 | + } |
| 51 | +} |
| 52 | +`), |
| 53 | + expandableCreative: []byte(` |
| 54 | +{ |
| 55 | + "id":"1234567893", |
| 56 | + "at":2, |
| 57 | + "tmax":120, |
| 58 | + "imp":[ |
| 59 | + { |
| 60 | + "id":"1", |
| 61 | + "iframebuster":[ |
| 62 | + "vendor1.com", |
| 63 | + "vendor2.com" |
| 64 | + ], |
| 65 | + "banner":{ |
| 66 | + "w":300, |
| 67 | + "h":250, |
| 68 | + "pos":1, |
| 69 | + "battr":[ |
| 70 | + 13 |
| 71 | + ], |
| 72 | + "expdir":[ |
| 73 | + 2, |
| 74 | + 4 |
| 75 | + ] |
| 76 | + } |
| 77 | + } |
| 78 | + ], |
| 79 | + "site":{ |
| 80 | + "id":"1345135123", |
| 81 | + "name":"Site ABCD", |
| 82 | + "domain":"siteabcd.com", |
| 83 | + "sitecat":[ |
| 84 | + "IAB2-1", |
| 85 | + "IAB2-2" |
| 86 | + ], |
| 87 | + "page":"http://siteabcd.com/page.htm", |
| 88 | + "ref":"http://referringsite.com/referringpage.htm", |
| 89 | + "privacypolicy":1, |
| 90 | + "publisher":{ |
| 91 | + "id":"pub12345", |
| 92 | + "name":"Publisher A" |
| 93 | + }, |
| 94 | + "content":{ |
| 95 | + "keyword":[ |
| 96 | + "keyword1", |
| 97 | + "keyword2", |
| 98 | + "keyword3" |
| 99 | + ] |
| 100 | + } |
| 101 | + }, |
| 102 | + "device":{ |
| 103 | + "ip":"64.124.253.1", |
| 104 | + "ua":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16", |
| 105 | + "os":"OS X", |
| 106 | + "flashver":"10.1", |
| 107 | + "js":1 |
| 108 | + }, |
| 109 | + "user":{ |
| 110 | + "id":"456789876567897654678987656789", |
| 111 | + "buyeruid":"545678765467876567898765678987654", |
| 112 | + "data":[ |
| 113 | + { |
| 114 | + "id":"6", |
| 115 | + "name":"Data Provider 1", |
| 116 | + "segment":[ |
| 117 | + { |
| 118 | + "id":"12341318394918", |
| 119 | + "name":"auto intenders" |
| 120 | + }, |
| 121 | + { |
| 122 | + "id":"1234131839491234", |
| 123 | + "name":"auto enthusiasts" |
| 124 | + }, |
| 125 | + { |
| 126 | + "id":"23423424", |
| 127 | + "name":"data-provider1-age", |
| 128 | + "value":"30-40" |
| 129 | + } |
| 130 | + ] |
| 131 | + } |
| 132 | + ] |
| 133 | + } |
| 134 | +}`), |
| 135 | +} |
0 commit comments