# serializer version: 1
# name: test__denormalize_territory_rights_and_sort[multiple_price_windows]
  list([
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
      ]),
      start_date=datetime.datetime(1999, 1, 1, 0, 0),
      end_date=datetime.datetime(2023, 1, 1, 0, 0),
      price_code='3',
      custom_price=CustomPricing(custom_currency_code='EUR', custom_price='0.99'),
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
      ]),
      start_date=datetime.datetime(2023, 1, 1, 0, 0),
      end_date=datetime.datetime(2024, 8, 12, 0, 0),
      price_code='3',
      custom_price=CustomPricing(custom_currency_code='EUR', custom_price='1.29'),
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
      ]),
      start_date=datetime.datetime(2024, 8, 12, 0, 0),
      end_date=None,
      price_code='3',
      custom_price=CustomPricing(custom_currency_code='EUR', custom_price='1.99'),
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__denormalize_territory_rights_and_sort[preorder_and_release_no_pricing]
  list([
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 10, 0, 0),
      end_date=datetime.datetime(2024, 8, 12, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 10, 0, 0),
      end_date=None,
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 12, 0, 0),
      end_date=None,
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__format_and_normalize_instant_grat_data[amazon_music]
  list([
    InstantGratRights(
      tuids=SortedSet({
        12345,
      }),
      start_date=datetime.datetime(2024, 8, 10, 0, 0),
      end_date=datetime.datetime(2024, 8, 11, 0, 0),
    ),
    InstantGratRights(
      tuids=SortedSet({
        12345,
        12349,
      }),
      start_date=datetime.datetime(2024, 8, 11, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
    ),
  ])
# ---
# name: test__format_territories_data_track_level[instant_grats_track_12345]
  dict({
    datetime.datetime(2024, 8, 10, 0, 0): list([
      'AT',
      'BE',
      'CA',
      'FR',
      'US',
    ]),
  })
# ---
# name: test__format_territories_data_track_level[instant_grats_track_12349]
  dict({
    datetime.datetime(2024, 8, 10, 0, 0): list([
      'US',
    ]),
    datetime.datetime(2024, 8, 11, 0, 0): list([
      'AT',
      'BE',
      'CA',
      'FR',
    ]),
  })
# ---
# name: test__format_territories_data_track_level[no_instant_grats_track_12345]
  dict({
    datetime.datetime(2024, 8, 10, 0, 0): list([
      'US',
    ]),
    datetime.datetime(2024, 8, 12, 0, 0): list([
      'AT',
      'BE',
      'CA',
      'FR',
    ]),
  })
# ---
# name: test__generate_sale_start_term_rights_product_level[start_date_eq_preorder_date]
  list([
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 10, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 12, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__generate_sale_start_term_rights_product_level[start_date_gt_sale_start_date]
  list([
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 12, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 19, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__generate_sale_start_term_rights_product_level[start_date_lt_preorder_date]
  list([
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 8, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 12, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__generate_sale_start_term_rights_track_level[instant_grat_track_affecting_sale_start_amazon]
  list([
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 10, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 11, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__generate_sale_start_term_rights_track_level[start_date_eq_preorder_date]
  list([
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 10, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 12, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__generate_sale_start_term_rights_track_level[start_date_gt_sale_start_date]
  list([
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 12, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 19, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__generate_sale_start_term_rights_track_level[start_date_lt_preorder_date]
  list([
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 8, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 12, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__get_splice_points[normal_mix_of_different_price_codes_startend_dates]
  list([
    datetime.datetime(2026, 1, 1, 0, 0),
    datetime.datetime(2026, 3, 17, 0, 0),
    datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
  ])
# ---
# name: test__get_splice_points[single_territory_pricing_no_instant_grats]
  list([
    datetime.datetime(1, 1, 1, 0, 0),
    datetime.datetime(2026, 1, 1, 0, 0),
    datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
  ])
# ---
# name: test__split_preorder_by_instant_grat_rights[complex_preorder_list]
  list([
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 1, 0, 0),
      end_date=datetime.datetime(2024, 8, 4, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 4, 0, 0),
      end_date=datetime.datetime(2024, 8, 7, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
      }),
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 7, 0, 0),
      end_date=datetime.datetime(2024, 8, 10, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
        12347,
      }),
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
      ]),
      start_date=datetime.datetime(2024, 8, 10, 0, 0),
      end_date=datetime.datetime(2024, 8, 12, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
        12347,
        12348,
      }),
    ),
    TerritoryRights(
      territories=list([
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 10, 0, 0),
      end_date=datetime.datetime(2024, 8, 19, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
        12347,
        12348,
      }),
    ),
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 10, 0, 0),
      end_date=datetime.datetime(2024, 8, 11, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
        12347,
        12348,
      }),
    ),
  ])
# ---
# name: test__split_preorder_by_instant_grat_rights[no_instant_grat_rights]
  list([
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 1, 0, 0),
      end_date=datetime.datetime(2024, 8, 12, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__split_preorder_by_instant_grat_rights[preorder_ending_for_us_before_grat_start_date]
  list([
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 1, 0, 0),
      end_date=datetime.datetime(2024, 8, 4, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 1, 0, 0),
      end_date=datetime.datetime(2024, 8, 3, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 4, 0, 0),
      end_date=datetime.datetime(2024, 8, 7, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
      }),
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 7, 0, 0),
      end_date=datetime.datetime(2024, 8, 10, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
        12347,
      }),
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
      ]),
      start_date=datetime.datetime(2024, 8, 10, 0, 0),
      end_date=datetime.datetime(2024, 8, 12, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
        12347,
        12348,
      }),
    ),
    TerritoryRights(
      territories=list([
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 10, 0, 0),
      end_date=datetime.datetime(2024, 8, 19, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
        12347,
        12348,
      }),
    ),
  ])
# ---
# name: test__split_preorder_by_instant_grat_rights[preorder_us_end_date_on_grat_start_date]
  list([
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 1, 0, 0),
      end_date=datetime.datetime(2024, 8, 4, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 4, 0, 0),
      end_date=datetime.datetime(2024, 8, 7, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
      }),
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
        'US',
      ]),
      start_date=datetime.datetime(2024, 8, 7, 0, 0),
      end_date=datetime.datetime(2024, 8, 10, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
        12347,
      }),
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
      ]),
      start_date=datetime.datetime(2024, 8, 10, 0, 0),
      end_date=datetime.datetime(2024, 8, 12, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
        12347,
        12348,
      }),
    ),
    TerritoryRights(
      territories=list([
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 10, 0, 0),
      end_date=datetime.datetime(2024, 8, 19, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
        12347,
        12348,
      }),
    ),
  ])
# ---
# name: test__split_preorder_by_instant_grat_rights[simple_preorder_list]
  list([
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 1, 0, 0),
      end_date=datetime.datetime(2024, 8, 4, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 4, 0, 0),
      end_date=datetime.datetime(2024, 8, 7, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
      }),
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 7, 0, 0),
      end_date=datetime.datetime(2024, 8, 10, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
        12347,
      }),
    ),
    TerritoryRights(
      territories=list([
        'AT',
        'BE',
        'CA',
        'FR',
      ]),
      start_date=datetime.datetime(2024, 8, 10, 0, 0),
      end_date=datetime.datetime(2024, 8, 12, 0, 0),
      price_code=None,
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=True,
      instant_gratification_tracks=SortedSet({
        12345,
        12347,
        12348,
      }),
    ),
  ])
# ---
# name: test__split_rights_terms_by_price[fabricate_end_dates]
  list([
    TerritoryRights(
      territories=list([
        'CA',
      ]),
      start_date=datetime.datetime(2026, 1, 1, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='3',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2026, 1, 1, 0, 0),
      end_date=datetime.datetime(2027, 1, 1, 0, 0),
      price_code='3',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2027, 1, 1, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='2',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__split_rights_terms_by_price[mix_price_codes_dates]
  list([
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2026, 1, 1, 0, 0),
      end_date=datetime.datetime(2026, 6, 1, 0, 0),
      price_code='3',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'CA',
      ]),
      start_date=datetime.datetime(2026, 2, 1, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='2',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'MX',
      ]),
      start_date=datetime.datetime(2026, 2, 1, 0, 0),
      end_date=datetime.datetime(2026, 4, 22, 0, 0),
      price_code='2',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'MX',
        'PE',
      ]),
      start_date=datetime.datetime(2026, 4, 22, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='1',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2026, 6, 1, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='2',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__split_rights_terms_by_price[mixed_pricing_dates]
  list([
    TerritoryRights(
      territories=list([
        'CA',
        'FR',
        'MX',
        'US',
      ]),
      start_date=datetime.datetime(2026, 1, 1, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='3',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__split_rights_terms_by_price[no_pricing_dates]
  list([
    TerritoryRights(
      territories=list([
        'CA',
        'FR',
        'US',
      ]),
      start_date=datetime.datetime(2026, 1, 1, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='3',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'MX',
      ]),
      start_date=datetime.datetime(2026, 1, 1, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='2',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'BR',
      ]),
      start_date=datetime.datetime(2026, 2, 1, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='2',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__split_rights_terms_by_price[one_territory_multi_prices]
  list([
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2026, 1, 1, 0, 0),
      end_date=datetime.datetime(2027, 1, 1, 0, 0),
      price_code='3',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2027, 1, 1, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='2',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__split_rights_terms_by_price[same_price_no_end_date]
  list([
    TerritoryRights(
      territories=list([
        'CA',
        'FR',
        'MX',
        'US',
      ]),
      start_date=datetime.datetime(2026, 1, 1, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='2',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__split_rights_terms_by_price[single_price_all_territories]
  list([
    TerritoryRights(
      territories=list([
        'BR',
        'CA',
        'FR',
        'IT',
        'MX',
        'SP',
        'US',
      ]),
      start_date=datetime.datetime(2026, 1, 1, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='2',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__split_rights_terms_by_price[single_territory_single_price]
  list([
    TerritoryRights(
      territories=list([
        'US',
      ]),
      start_date=datetime.datetime(2026, 1, 1, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='3',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
# name: test__split_rights_terms_by_price[two_starts_diff_prices]
  list([
    TerritoryRights(
      territories=list([
        'CA',
        'FR',
        'US',
      ]),
      start_date=datetime.datetime(2026, 1, 1, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='2',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'MX',
      ]),
      start_date=datetime.datetime(2026, 1, 1, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='1',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
    TerritoryRights(
      territories=list([
        'IT',
        'SP',
      ]),
      start_date=datetime.datetime(2026, 2, 1, 0, 0),
      end_date=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999),
      price_code='2',
      custom_price=None,
      distribution_rights=SortedSet({
        <DownloadStreamRights.DOWNLOAD: 'download'>,
        <DownloadStreamRights.STREAM: 'stream'>,
      }),
      is_preorder=False,
      instant_gratification_tracks=None,
    ),
  ])
# ---
