from datetime import datetime, timedelta from tests.root_fixture import root_fixture fixture = { **root_fixture, "User": [ { "id": 1, "email": "dev-marketing-user-1@example.com", "external_id": "sme-dna|5cf0091d6c91d310fe6fcdc6", "name": "user-1", "phone": "", } ], "CampaignTypeCity": [{"id": 100, "name": "New York"}], "Project": [ { "id": 500, "name": "test_project_1", "label_id": 1, "created_at": "2019-07-22 16:14:35.748032", "create_user_id": 1, "updated_at": "2019-07-22 16:14:55.446196", "edit_user_id": 1, "currency": "UAH", "is_deleted": False, "is_claimed": True, "end_date": datetime.strftime(datetime.now() + timedelta(days=200), "%Y-%m-%d"), "is_confidential": False, "budget": 66666, "allocation": 66666, "initial_start_date": "2022-10-11", "gras_title": "New Frontline Release", "gras_project_code": "12345514", "prs_title": "New Frontline Release(PRS)", "prs_project_code": "012345514", "updated_by_import_at": "2020-10-11", }, { "id": 501, "name": "test_project_1", "label_id": 1, "created_at": "2019-07-22 16:14:35.748032", "create_user_id": 1, "updated_at": "2019-07-22 16:14:55.446196", "currency": "UAH", "edit_user_id": 1, "is_deleted": False, "is_claimed": True, "end_date": "2020-10-11", "is_confidential": False, "budget": 11111, "allocation": 11111, "initial_start_date": "2022-10-11", "gras_title": "New Frontline Release", "gras_project_code": "12345515", "prs_title": "New Frontline Release(PRS)", "prs_project_code": "012345515", "updated_by_import_at": "2020-10-11", }, { "id": 502, "name": "test_project_2", "label_id": 1, "created_at": "2019-07-22 16:14:35.748032", "create_user_id": 1, "updated_at": "2019-07-22 16:14:55.446196", "currency": "UAH", "edit_user_id": 1, "is_deleted": True, "is_claimed": True, "end_date": "2020-10-11", "is_confidential": False, "budget": 123466, "allocation": 123466, "initial_start_date": "2022-10-11", "gras_title": "New Frontline Release", "gras_project_code": "12345516", "prs_title": "New Frontline Release(PRS)", "prs_project_code": "012345516", "updated_by_import_at": "2020-10-11", }, { "id": 503, "name": "test_project_gras_1", "label_id": 1, "created_at": "2019-07-22 16:14:35.748032", "create_user_id": 1, "updated_at": "2019-07-22 16:14:55.446196", "currency": "UAH", "edit_user_id": 1, "is_claimed": True, "end_date": "2020-10-11", "is_confidential": False, "budget": 2222, "allocation": 2222, "initial_start_date": "2022-10-11", "gras_title": "New Frontline Release", "gras_project_code": "12345517", "prs_title": "New Frontline Release(PRS)", "prs_project_code": "012345517", "updated_by_import_at": "2020-10-11", }, ], "Label": [ { "id": 1, "name": "Columbia Records", "rep_owner_key": "123456", "external_name": "Columbia Records", "child_rep_owner_keys": "{}", }, { "id": 2, "name": "Epic Records", "rep_owner_key": "223456", "external_name": "Epic Records", "child_rep_owner_keys": "{}", }, { "id": 3, "name": "RCA Records", "rep_owner_key": "323456", "external_name": "RCA Records", "child_rep_owner_keys": "{}", }, {"id": 4, "name": "CMG", "rep_owner_key": "423456", "external_name": "CMG", "child_rep_owner_keys": "{}"}, { "id": 5, "name": "Nashville", "rep_owner_key": "523456", "external_name": "Nashville", "child_rep_owner_keys": "{}", }, ], "UserLabel": [{"user_id": 1, "label_id": 1}], "RecordType": [{"id": 1, "name": "Album"}], "ArtistLevel": [{"id": 1, "name": "New"}], "Contact": [{"id": 1, "name": "TestContactName", "email": "test@gmail.com", "phone": "+2141111111"}], "Currency": [{"id": 1, "name": "United States Dollar", "code": "USD"}], "Genre": [{"id": 1, "name": "2-step"}], "ProjectTargetItem": [ {"project_id": 500, "entity_id": 10, "entity_type": 0}, {"project_id": 500, "entity_id": 20, "entity_type": 0}, {"project_id": 501, "entity_id": 10, "entity_type": 0}, {"project_id": 502, "entity_id": 110, "entity_type": 3}, {"project_id": 502, "entity_id": 120, "entity_type": 3}, ], "Artist": [ {"id": 10, "external_id": "GRAS_123124", "name": "TestAtrist", "is_sony": True}, {"id": 20, "external_id": "GRAS_123134324", "name": "TestArtist2", "is_sony": True}, ], "Polymorphable": [ {"id": 10, "type": "Artist"}, {"id": 20, "type": "Artist"}, {"id": 110, "type": "Playlist"}, {"id": 120, "type": "Playlist"}, ], "Playlist": [ {"id": 110, "external_id": "05", "name": "Playlist1", "owner_name": "Owner1", "provider": "apple"}, {"id": 120, "external_id": "06", "name": "Playlist2", "owner_name": "Owner2", "provider": "spotify"}, ], "Image": [], "MediaPlan": [ {"id": 42, "name": "Untitled For Test", "project_id": 500, "order": 0}, {"id": 43, "name": "Untitled For Test", "project_id": 501, "order": 0}, ], "MediaPlanPhase": [ {"id": 450, "media_plan_id": 42, "name": "Phase For Test", "order": 1}, {"id": 550, "media_plan_id": 42, "name": "Phase For Test [Empty]", "order": 3}, {"id": 555, "media_plan_id": 42, "name": "Phase For Test [All Deleted]", "order": 4}, {"id": 560, "media_plan_id": 42, "name": "Phase For Test with Asset", "order": 2}, {"id": 780, "media_plan_id": 43, "name": "Phase 1", "order": 0}, {"id": 781, "media_plan_id": 43, "name": "Phase 2", "order": 1}, ], "TerritoryType": [{"id": 1, "name": "Global type"}], "Territory": [ {"id": 1, "name": "USA", "code": "USA", "territory_type_id": 1}, {"id": 2, "name": "Ukraine", "code": "UA", "territory_type_id": 1}, ], "CampaignTerritory": [ {"campaign_id": 100, "territory_id": 1, "budget_spend": 5000}, {"campaign_id": 200, "territory_id": 2, "budget_spend": 5000}, {"campaign_id": 300, "territory_id": 1, "budget_spend": 5000}, {"campaign_id": 400, "territory_id": 1, "budget_spend": 5000}, {"campaign_id": 401, "territory_id": 1, "budget_spend": 5000}, ], "Campaign": [ { "id": 100, "uuid": "34ed4c22-e1f9-4184-a06d-f04cbdb97455", "name": "test_campaign_1", "project_id": 500, "source": "facebook", "external_id": "45678909", "create_user_id": 1, "start_date": "2007-10-11", "end_date": "2007-11-10", "planned_budget": 222, "budget_spend": 12, "currency_id": 1, "created_at": "2019-07-22 16:14:55.355226", "updated_at": "2019-07-22 16:14:55.355226", "edit_user_id": 1, "provider_id": 1, "age_range": "[0, 60]", "objective_id": 1, "notes": "Lorem Ipsum", "purchase_order_id": 474, "metainfo": { "fields": { "budget": True, "spend": True, "startDate": True, "endDate": True, "genders": True, "audienceAge": True, "countries": True, "destinations": True, "notes": True, } }, }, { "id": 200, "uuid": "aa1490b5-832c-4852-9d28-7a96884ff399", "name": "test_campaign_2", "source": "PRS", "project_id": 500, "create_user_id": 1, "start_date": "2008-02-02", "end_date": "2008-10-10", "planned_budget": 190000, "budget_spend": 90000, "currency_id": 1, "created_at": "2019-07-22 19:14:55.355226", "updated_at": "2019-07-22 20:14:55.355226", "edit_user_id": 1, "provider_id": 1, "age_range": "[18, 35]", "objective_id": 2, "metainfo": { "fields": { "budget": False, "spend": True, "startDate": True, "endDate": False, "genders": True, "audienceAge": True, "countries": True, "destinations": True, "notes": True, } }, }, { "id": 300, "uuid": "c40fe4e8-58ce-4ba6-ab10-4932e685a389", "name": "test_deleted_campaign_3", "project_id": 500, "create_user_id": 1, "start_date": "2007-02-02", "end_date": "2008-10-10", "planned_budget": 1000, "budget_spend": 10000, "currency_id": 1, "created_at": "2019-07-22 19:14:55.355226", "updated_at": "2019-07-22 20:14:55.355226", "edit_user_id": 1, "is_deleted": True, "provider_id": 1, "age_range": "[0, 60]", "objective_id": 1, }, { "id": 400, "uuid": "2dd6f9b4-42f5-48e8-a01f-c7bb9dc6434d", "name": "test_deleted_campaign_4", "project_id": 500, "create_user_id": 1, "start_date": "2015-02-02", "end_date": "2016-10-10", "planned_budget": 12000, "budget_spend": 15000, "currency_id": 1, "created_at": "2019-07-22 19:14:55.355226", "updated_at": "2019-07-22 20:14:55.355226", "edit_user_id": 1, "is_deleted": True, "provider_id": 1, "age_range": "[0, 60]", "objective_id": 1, }, { "id": 401, "uuid": "55e87545-a3b3-4bd1-9357-a5373df46270", "name": "test_401", "project_id": 500, "create_user_id": 1, "start_date": "2007-01-01", "end_date": "2015-02-02", "planned_budget": 12000, "budget_spend": 15000, "currency_id": 1, "created_at": "2019-07-22 19:14:55.355226", "updated_at": "2019-07-22 20:14:55.355226", "edit_user_id": 1, "provider_id": 1, "age_range": "[0, 60]", "objective_id": 1, }, { "id": 500, "uuid": "20618d97-5190-4589-8fed-9e109e5ac5b5", "name": "test_campaign_5", "project_id": 501, "create_user_id": 1, "start_date": "2015-02-02", "end_date": "2015-03-10", "planned_budget": 15000, "budget_spend": 15000, "currency_id": 1, "created_at": "2019-07-22 19:14:55.355226", "updated_at": "2019-07-22 20:14:55.355226", "edit_user_id": 1, "provider_id": 1, "age_range": "[0, 60]", "objective_id": 1, }, { "id": 600, "uuid": "0b70c231-1997-417b-a23f-9a89ffa4f6bf", "name": "test_campaign_6", "project_id": 501, "create_user_id": 1, "start_date": "2015-02-05", "end_date": "2015-02-12", "planned_budget": 14000, "budget_spend": 15000, "currency_id": 1, "created_at": "2019-07-22 19:14:55.355226", "updated_at": "2019-07-22 20:14:55.355226", "edit_user_id": 1, "provider_id": 1, "age_range": "[0, 60]", "objective_id": 1, }, { "id": 700, "uuid": "9d6211cf-1e47-487d-bb01-e08f6472d71e", "name": "test_campaign_7", "create_user_id": 1, "start_date": "2015-02-05", "end_date": "2015-02-12", "planned_budget": 1000, "budget_spend": 100, "currency_id": 1, "created_at": "2019-07-22 19:14:55.355226", "updated_at": "2019-07-22 20:14:55.355226", "edit_user_id": 1, "provider_id": 1, "age_range": "[0, 60]", "objective_id": 1, }, { "id": 800, "uuid": "df9a3dc8-c3d3-440c-bc3c-cee1c3c2dd67", "name": "test_campaign_8", "project_id": 503, "create_user_id": 1, "start_date": "2015-02-05", "end_date": "2015-02-12", "planned_budget": 1000, "budget_spend": 100, "currency_id": 1, "created_at": "2019-07-22 19:14:55.355226", "updated_at": "2019-07-22 20:14:55.355226", "edit_user_id": 1, "provider_id": 1, "age_range": "[0, 60]", "objective_id": 1, }, ], "ProjectCampaign": [{"project_id": 503, "campaign_id": 700, "status": 0}], "CampaignLink": [{"campaign_id": 100, "link": "www.sony.com"}, {"campaign_id": 100, "link": "www.decibel.com"}], "ProjectHistoryItem": [ {"project_id": 500, "created_at": "2019-01-01 00:00:00", "user_id": 1, "action_id": 1, "campaign_id": 200}, {"project_id": 500, "campaign_id": 100, "created_at": "2019-01-01 00:00:01", "user_id": 1, "action_id": 1}, ], "CampaignGender": [ {"campaign_id": 100, "gender_id": 1}, {"campaign_id": 200, "gender_id": 1}, {"campaign_id": 200, "gender_id": 2}, {"campaign_id": 300, "gender_id": 1}, {"campaign_id": 400, "gender_id": 1}, {"campaign_id": 500, "gender_id": 1}, {"campaign_id": 600, "gender_id": 1}, {"campaign_id": 401, "gender_id": 1}, ], "PRSPurchaseOrder": [ { "id": 474, "name": "Jesse Rutherford indie fees Q1 F20 | PO 1092858000", "po_number": 1092858000, "total_amount": 9000.00, "paid_amount": 7000.00, "group_id": 1, "category_id": 1, "created_date": "2019-04-03", "last_modified_date": "2019-10-01", "is_blanked": True, "is_deleted": False, "description": "Jess Rutherford indie press", "status": 10, "project_id": 502, "provider_id": 1, } ], "LinkfireCampaign": [ {"campaign_id": 100, "linkfire_id": 1}, {"campaign_id": 100, "linkfire_id": 2}, {"campaign_id": 100, "linkfire_id": 3}, ], "Linkfire": [ {"id": 1, "link_id": "afe36ac9-121b-4f23-a2f5-02417491828d", "link_url": "lnk.to/blink182_NACS"}, {"id": 2, "link_id": "9dcb0346-6c8f-45d7-b229-93f859238721", "link_url": "Blink182.lnk.to/NACS"}, {"id": 3, "link_id": "2b190f7c-cf68-4741-9c06-2718c473f6e5", "link_url": "lnk.to/Blink_182"}, {"id": 4, "link_id": "ca98fcdd-61ae-43df-b973-765c1ed9143f", "link_url": "lnk.to/blink-182_BIOMY"}, {"id": 5, "link_id": "90708787-46a8-4d38-8f5f-4b730951e395", "link_url": "Blink182.lnk.to/Quarantine"}, ], "UserProject": [ {"project_id": 500, "user_id": 1, "shared_by": 1, "editable": False, "role": 1}, {"project_id": 501, "user_id": 1, "shared_by": 1, "editable": False, "role": 1}, {"project_id": 502, "user_id": 1, "shared_by": 1, "editable": False, "role": 1}, {"project_id": 503, "user_id": 1, "shared_by": 1, "editable": False, "role": 1}, ], }