@@ -93,6 +93,13 @@ class MockSimpleSalesforce360Giving(MockSimpleSalesforce):
9393 },
9494 ]
9595
96+ FUNDER_STATUSES = [
97+ "Funder in GrantNav" ,
98+ "360Giving Publisher" ,
99+ "Something else" ,
100+ None ,
101+ ]
102+
96103 def __init__ (self , ** kwargs ) -> None :
97104 """Initialise a Mock SimpleSalesforce object setup to represent the 360 Registry
98105
@@ -110,6 +117,17 @@ def __init__(self, **kwargs) -> None:
110117 "Authorised_Domain" ,
111118 "Self_registration_enabled" ,
112119 "Last_published_date" ,
120+ "Publisher_Prefix_Combined" ,
121+ "Publisher_Prefix" ,
122+ "Org_Case_Safe_ID" ,
123+ "X360Giving_Publisher" ,
124+ "Sectors" ,
125+ "Sector_Organisation_type" ,
126+ "Sector_Organisation_sub_type" ,
127+ "First_Published_Date" ,
128+ "Latest_Published_Date" ,
129+ "Update_schedule" ,
130+ "Update_Method" ,
113131 ]
114132 )
115133
@@ -181,21 +199,31 @@ def _generate_accounts(self, num: int, num_with_no_prefix: int) -> None:
181199 else None
182200 )
183201 base_url = random_invalid_base_url (self .rnd )
202+ prefix = f"360G-CT{ index + 1 } " if index > (num_with_no_prefix - 1 ) else None
184203 self .create_record (
185204 "Account" ,
186205 {
187206 "Name" : f"Charitable Trust { index + 1 } " ,
188207 "Logo__c" : logo ,
189208 "Website" : base_url + "index.html" ,
190- "prefix__c" : (
191- f"360G-CT{ index + 1 } "
192- if index > (num_with_no_prefix - 1 )
193- else None
194- ),
209+ "prefix__c" : prefix ,
195210 "Org_Identifier__c" : random_orgid (self .rnd ),
196211 "Authorised_Domain__c" : base_url ,
197212 "Self_registration_enabled__c" : False ,
198213 "Last_published_date__c" : datetime (1900 , 1 , 1 , 0 , 0 , 0 ),
214+ "Publisher_Prefix_Combined__c" : prefix ,
215+ "Publisher_Prefix__c" : prefix ,
216+ "Org_Case_Safe_ID__c" : f"case-safe-{ index + 1 } " ,
217+ "X360Giving_Publisher__c" : self .FUNDER_STATUSES [
218+ index % len (self .FUNDER_STATUSES )
219+ ],
220+ "Sectors__c" : "Health" ,
221+ "Sector_Organisation_type__c" : "Charity" ,
222+ "Sector_Organisation_sub_type__c" : "Grant-maker" ,
223+ "First_Published_Date__c" : datetime (2017 , 1 , 1 , 0 , 0 , 0 ),
224+ "Latest_Published_Date__c" : datetime (1900 , 1 , 1 , 0 , 0 , 0 ),
225+ "Update_schedule__c" : "Quarterly" ,
226+ "Update_Method__c" : "API" ,
199227 },
200228 )
201229
0 commit comments