{
	"mock_config_values": {
		"NoticeNumberOfBuckets": 2
	},
	"test_cases": {
		"single_full_anon": {
			"comment": "A single, unthrottled, non-geotargeted campaign, with a banner for anonymous users on one device",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_targeted": {
					"comment": "Context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 1,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						}
					}
				},
				"untargeted_project": {
					"comment": "Not the project targeted by the campaign",
					"context": {
						"project": "test_project2",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [],
					"allocations": {}
				},
				"untargeted_language": {
					"comment": "Not the language targeted by the campaign",
					"context": {
						"project": "test_project1",
						"language": "pt",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [],
					"allocations": {}
				},
				"untargeted_device": {
					"comment": "User is on a device for which the campaign has no banners",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "iphone",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {}
				},
				"untargeted_because_logged_in": {
					"comment": "User is logged in, and the campaign has no banners for logged-in users",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "logged_in"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {}
				}
			}
		},
		"single_full_logged_in": {
			"comment": "A single, unthrottled, non-geotargeted campaign, with a banner for logged-in users on one device",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": false,
								"display_account": true,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_targeted": {
					"comment": "Context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "logged_in"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": false,
									"display_account": true,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 1,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						}
					}
				},
				"untargeted_because_anon": {
					"comment": "User is anonymous, and the campaign has no banners for anonymous users",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": false,
									"display_account": true,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {}
				}
			}
		},
		"single_full_anon_and_logged_in": {
			"comment": "A single, unthrottled, non-geotargeted campaign, with a banner for anonymous and logged-in users on one device",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": true,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_targeted_anon": {
					"comment": "Context targeted by the campaign, anonymous user (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": true,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 1,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						}
					}
				},
				"as_targeted_logged_in": {
					"comment": "Context targeted by the campaign, logged-in user (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "logged_in"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": true,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 1,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						}
					}
				}
			}
		},
		"single_full_anon_geo": {
			"comment": "A single, unthrottled, geotargeted campaign, with a banner for anonymous users on one device",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": true,
						"countries": [ "LU" ],
						"regions": [],
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_targeted": {
					"comment": "Context targeted by the campaign",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 1,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						}
					}
				},
				"untargeted_country": {
					"comment": "User isn't in the targeted country",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "CA",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {}
				}
			}
		},
		"not_enabled": {
			"comment": "A campaign that's not enabled, with a banner for anonymous users on one device",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 0,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_almost_targeted": {
					"comment": "Campaign not available even though this is the context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [],
					"allocations": {}
				}
			}
		},
		"archived": {
			"comment": "An archived campaign, with a banner for anonymous users on one device",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": true,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_almost_targeted": {
					"comment": "Campaign not available even though this is the context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [],
					"allocations": {}
				}
			}
		},
		"ended": {
			"comment": "A campaign that already ended, with a banner for anonymous users on one device",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": -2,
						"end_days_from_now": -1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_almost_targeted": {
					"comment": "Campaign not available even though this is the context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [],
					"allocations": {}
				}
			}
		},
		"not_started": {
			"comment": "A campaign that hasn't started yet, with a banner for anonymous users on one device",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 1,
						"end_days_from_now": 2,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_almost_targeted": {
					"comment": "Campaign not available even though this is the context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [],
					"allocations": {}
				}
			}
		},
		"buckets": {
			"comment": "A single, unthrottled, non-geotargeted campaign, with different banners for each bucket, for anonymous users on one device",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 2,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							},
							{
								"name": "b2",
								"weight": 25,
								"bucket": 1,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_targeted": {
					"comment": "Context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 2,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								},
								{
									"name": "b2",
									"bucket": 1,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 1,
							"banners": [
								{
									"b1": 1
								},
								{
									"b2": 1
								}
							]
						}
					}
				}
			}
		},
		"multiple_partially_overlapping_geo": {
			"comment": "Multiple partially overlapping campaigns producing different allocations for different regions",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": true,
						"countries": [ "CA", "BR", "LU" ],
						"regions": [],
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					},
					{
						"name": "c2",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": true,
						"countries": [ "CA", "LU" ],
						"regions": [],
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b2",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					},
					{
						"name": "c3",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": true,
						"countries": [ "LU" ],
						"regions": [],
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b3",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"targeted_by_3": {
					"comment": "Country targeted by three campaigns",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "CA", "BR", "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "CA", "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c3",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b3",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 0.333,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						},
						"c2": {
							"allocation": 0.333,
							"banners": [
								{
									"b2": 1
								},
								{
									"b2": 1
								}
							]
						},
						"c3": {
							"allocation": 0.333,
							"banners": [
								{
									"b3": 1
								},
								{
									"b3": 1
								}
							]
						}
					}
				},
				"targeted_by_2": {
					"comment": "Country targeted by three campaigns",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "CA",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "BR", "CA", "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "CA", "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c3",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b3",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 0.5,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						},
						"c2": {
							"allocation": 0.5,
							"banners": [
								{
									"b2": 1
								},
								{
									"b2": 1
								}
							]
						}
					}
				},
				"targeted_by_1": {
					"comment": "Country targeted by three campaigns",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "BR",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "BR", "CA", "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "CA", "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c3",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b3",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 1,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						}
					}
				},
				"targeted_by_0": {
					"comment": "Country targeted by three campaigns",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "NE",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "BR", "CA", "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "CA", "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c3",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b3",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {}
				}
			}
		},
		"multiple_partially_overlapping_geo_and_nongeo": {
			"comment": "Multiple partially overlapping campaigns, including geo- and non-geo-targeted, producing different allocations for different regions",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					},
					{
						"name": "c2",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": true,
						"countries": [ "LU", "CA" ],
						"regions": [],
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b2",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					},
					{
						"name": "c3",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": true,
						"countries": [ "LU" ],
						"regions": [],
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b3",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"targeted_by_2_and_non_geo": {
					"comment": "Country targeted by two geotargeted campaigns and one non-geotargeted campaign",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "CA", "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c3",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b3",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 0.333,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						},
						"c2": {
							"allocation": 0.333,
							"banners": [
								{
									"b2": 1
								},
								{
									"b2": 1
								}
							]
						},
						"c3": {
							"allocation": 0.333,
							"banners": [
								{
									"b3": 1
								},
								{
									"b3": 1
								}
							]
						}
					}
				},
				"targeted_by_1_and_non_geo": {
					"comment": "Country targeted by one geotargeted campaign and one non-geotargeted campaign",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "CA",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "CA", "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c3",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b3",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 0.5,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						},
						"c2": {
							"allocation": 0.5,
							"banners": [
								{
									"b2": 1
								},
								{
									"b2": 1
								}
							]
						}
					}
				},
				"targeted_by_non_geo": {
					"comment": "Country targeted only by non-geotargeted campaign",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "BR",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "CA", "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c3",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b3",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 1,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						}
					}
				}
			}
		},
		"multiple_partially_overlapping_heterogeneous": {
			"comment": "Multiple partially overlapping campaigns on a diversity of taregeting criteria",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					},
					{
						"name": "c2",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": true,
						"countries": [ "LU" ],
						"regions": [],
						"projects": [ "test_project" ],
						"languages": [ "en", "fr" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b2",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					},
					{
						"name": "c3",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": true,
						"countries": [ "LU" ],
						"regions": [],
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b3",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop", "iphone"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"targeted_by_c1_c2_c3": {
					"comment": "Targeted by all 3 campaigns",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c3",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b3",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop", "iphone"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 0.333,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						},
						"c2": {
							"allocation": 0.333,
							"banners": [
								{
									"b2": 1
								},
								{
									"b2": 1
								}
							]
						},
						"c3": {
							"allocation": 0.333,
							"banners": [
								{
									"b3": 1
								},
								{
									"b3": 1
								}
							]
						}
					}
				},
				"targeted_by_c1": {
					"comment": "Targeted by campaign c1",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "BR",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c3",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b3",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop", "iphone"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 1,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						}
					}
				},
				"targeted_by_c2": {
					"comment": "Targeted by campaign c2",
					"context": {
						"project": "test_project",
						"language": "fr",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c2": {
							"allocation": 1,
							"banners": [
								{
									"b2": 1
								},
								{
									"b2": 1
								}
							]
						}
					}
				},
				"targeted_by_c3": {
					"comment": "Targeted by campaign c3",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "iphone",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c3",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [ "LU" ],
							"regions": [],
							"banners": [
								{
									"name": "b3",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop", "iphone"
									]
								}
							]
						}
					],
					"allocations": {
						"c3": {
							"allocation": 1,
							"banners": [
								{
									"b3": 1
								},
								{
									"b3": 1
								}
							]
						}
					}
				}
			}
		},
		"two_priorities_unthrottled": {
			"comment": "Two unthrottled campaigns of different priorities; the higher priority eclipses the lower one",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					},
					{
						"name": "c2",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 2,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b2",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_targeted": {
					"comment": "Context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 2,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 0
						},
						"c2": {
							"allocation": 1,
							"banners": [
								{
									"b2": 1
								},
								{
									"b2": 1
								}
							]
						}
					}
				}
			}
		},
		"single_throttled": {
			"comment": "A single throttled campaign",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 50,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_targeted": {
					"comment": "Context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 50,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 0.5,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						}
					}
				}
			}
		},
		"two_priorities_throttled_leaving_space": {
			"comment": "Two throttled campaigns of different priorities; both leave space.",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 25,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					},
					{
						"name": "c2",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 2,
						"throttle": 50,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b2",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_targeted": {
					"comment": "Context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 25,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 2,
							"throttle": 50,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 0.25,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						},
						"c2": {
							"allocation": 0.5,
							"banners": [
								{
									"b2": 1
								},
								{
									"b2": 1
								}
							]
						}
					}
				}
			}
		},
		"two_priorities_throttled_no_space": {
			"comment": "Two throttled campaigns of different priorities; no space is left over.",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 75,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					},
					{
						"name": "c2",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 2,
						"throttle": 50,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b2",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_targeted": {
					"comment": "Context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 75,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 2,
							"throttle": 50,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 0.5,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						},
						"c2": {
							"allocation": 0.5,
							"banners": [
								{
									"b2": 1
								},
								{
									"b2": 1
								}
							]
						}
					}
				}
			}
		},
		"throttled_and_not_throttled_same_priority": {
			"comment": "Two campaigns, one of them throttled, at the same priority",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 50,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					},
					{
						"name": "c2",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b2",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_targeted": {
					"comment": "Context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 50,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 0.5,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						},
						"c2": {
							"allocation": 0.5,
							"banners": [
								{
									"b2": 1
								},
								{
									"b2": 1
								}
							]
						}
					}
				}
			}
		},
		"multiple_throttled_and_not_throttled_different_priorities": {
			"comment": "Four campaigns at two priorities, all throttled except one at the lower priority",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					},
					{
						"name": "c2",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 10,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b2",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					},
					{
						"name": "c3",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 2,
						"throttle": 25,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b3",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					},
					{
						"name": "c4",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 2,
						"throttle": 50,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b4",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_targeted": {
					"comment": "Context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 10,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c3",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 2,
							"throttle": 25,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b3",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c4",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 2,
							"throttle": 50,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b4",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 0.15,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						},
						"c2": {
							"allocation": 0.1,
							"banners": [
								{
									"b2": 1
								},
								{
									"b2": 1
								}
							]
						},
						"c3": {
							"allocation": 0.25,
							"banners": [
								{
									"b3": 1
								},
								{
									"b3": 1
								}
							]
						},
						"c4": {
							"allocation": 0.5,
							"banners": [
								{
									"b4": 1
								},
								{
									"b4": 1
								}
							]
						}
					}
				}
			}
		},
		"multiple_banners_same_weights": {
			"comment": "A single campaign with two banners of the same weight",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							},
							{
								"name": "b2",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_targeted": {
					"comment": "Context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								},
								{
									"name": "b2",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 1,
							"banners": [
								{
									"b1": 0.5,
									"b2": 0.5
								},
								{
									"b1": 0.5,
									"b2": 0.5
								}
							]
						}
					}
				}
			}
		},
		"multiple_banners_different_weights": {
			"comment": "A single campaign with two banners of the different weights",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 40,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							},
							{
								"name": "b2",
								"weight": 10,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_targeted": {
					"comment": "Context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 40,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								},
								{
									"name": "b2",
									"bucket": 0,
									"weight": 10,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 1,
							"banners": [
								{
									"b1": 0.8,
									"b2": 0.2
								},
								{
									"b1": 0.8,
									"b2": 0.2
								}
							]
						}
					}
				}
			}
		},
		"priority_throttling_and_weights": {
			"comment": "Two throttled campaigns of differnt priorities, each with two banners of the different weights",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 75,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 90,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							},
							{
								"name": "b2",
								"weight": 10,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					},
					{
						"name": "c2",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 2,
						"throttle": 50,
						"geotargeted": false,
						"projects": [ "test_project" ],
						"languages": [ "en" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b3",
								"weight": 40,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							},
							{
								"name": "b4",
								"weight": 10,
								"bucket": 0,
								"display_anon": true,
								"display_account": false,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_targeted": {
					"comment": "Context targeted by the campaign (country shouldn't matter)",
					"context": {
						"project": "test_project",
						"language": "en",
						"country": "LU",
						"region": "",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 75,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 90,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								},
								{
									"name": "b2",
									"bucket": 0,
									"weight": 10,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						},
						{
							"name": "c2",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 2,
							"throttle": 50,
							"bucket_count": 1,
							"geotargeted": false,
							"banners": [
								{
									"name": "b3",
									"bucket": 0,
									"weight": 40,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								},
								{
									"name": "b4",
									"bucket": 0,
									"weight": 10,
									"category": "fundraising",
									"display_anon": true,
									"display_account": false,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 0.5,
							"banners": [
								{
									"b1": 0.9,
									"b2": 0.1
								},
								{
									"b1": 0.9,
									"b2": 0.1
								}
							]
						},
						"c2": {
							"allocation": 0.5,
							"banners": [
								{
									"b3": 0.8,
									"b4": 0.2
								},
								{
									"b3": 0.8,
									"b4": 0.2
								}
							]
						}
					}
				}
			}
		},
		"single_anon_geo_region": {
			"comment": "A single, unthrottled, geotargeted by region campaign, with a banner for anonymous users on one device",
			"setup": {
				"campaigns": [
					{
						"name": "c1",
						"enabled": 1,
						"start_days_from_now": 0,
						"end_days_from_now": 1,
						"preferred": 1,
						"throttle": 100,
						"geotargeted": true,
						"countries": [],
						"regions": [ "RU_MOW" ],
						"projects": [ "test_project" ],
						"languages": [ "ru" ],
						"archived": false,
						"bucket_count": 1,
						"banners": [
							{
								"name": "b1",
								"weight": 25,
								"bucket": 0,
								"display_anon": true,
								"display_account": true,
								"category": "fundraising",
								"devices": [
									"desktop"
								]
							}
						]
					}
				]
			},
			"contexts_and_outputs": {
				"as_targeted": {
					"comment": "Context targeted by the campaign",
					"context": {
						"project": "test_project",
						"language": "ru",
						"country": "RU",
						"region": "MOW",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [],
							"regions": [ "RU_MOW" ],
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": true,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {
						"c1": {
							"allocation": 1,
							"banners": [
								{
									"b1": 1
								},
								{
									"b1": 1
								}
							]
						}
					}
				},
				"untargeted_region": {
					"comment": "User isn't in the targeted region",
					"context": {
						"project": "test_project",
						"language": "ru",
						"country": "RU",
						"region": "SPE",
						"device": "desktop",
						"logged_in_status": "anonymous"
					},
					"choices": [
						{
							"name": "c1",
							"start_days_from_now": 0,
							"end_days_from_now": 1,
							"preferred": 1,
							"throttle": 100,
							"bucket_count": 1,
							"geotargeted": true,
							"countries": [],
							"regions": [ "RU_MOW" ],
							"banners": [
								{
									"name": "b1",
									"bucket": 0,
									"weight": 25,
									"category": "fundraising",
									"display_anon": true,
									"display_account": true,
									"devices": [
										"desktop"
									]
								}
							]
						}
					],
					"allocations": {}
				}
			}
		}
	}
}
