@@ -82,7 +82,7 @@ def load_initial_data(app, *args, **kwargs):
82
82
83
83
EligibilityVerifier = app .get_model ("core" , "EligibilityVerifier" )
84
84
85
- EligibilityVerifier .objects .create (
85
+ verifier1 = EligibilityVerifier .objects .create (
86
86
name = "Test Eligibility Verifier 1" ,
87
87
api_url = "http://server:5000/verify" ,
88
88
api_auth_header = "X-Server-API-Key" ,
@@ -113,7 +113,7 @@ def load_initial_data(app, *args, **kwargs):
113
113
unverified_blurb = _ ("eligibility.pages.unverified.dmv.p[0]" ),
114
114
)
115
115
116
- EligibilityVerifier .objects .create (
116
+ verifier2 = EligibilityVerifier .objects .create (
117
117
name = "Test Eligibility Verifier 2" ,
118
118
api_url = "http://server:5000/verify" ,
119
119
api_auth_header = "X-Server-API-Key" ,
@@ -161,7 +161,7 @@ def load_initial_data(app, *args, **kwargs):
161
161
162
162
PaymentProcessor = app .get_model ("core" , "PaymentProcessor" )
163
163
164
- PaymentProcessor .objects .create (
164
+ payment_processor = PaymentProcessor .objects .create (
165
165
name = "Test Payment Processor" ,
166
166
api_base_url = "http://server:5000" ,
167
167
api_access_token_endpoint = "access-token" ,
@@ -178,6 +178,40 @@ def load_initial_data(app, *args, **kwargs):
178
178
group_endpoint = "group" ,
179
179
)
180
180
181
+ TransitAgency = app .get_model ("core" , "TransitAgency" )
182
+
183
+ transit_agency1 = TransitAgency .objects .create (
184
+ slug = "abc" ,
185
+ short_name = "ABC" ,
186
+ long_name = "ABC Transit Company" ,
187
+ agency_id = "abc123" ,
188
+ merchant_id = "abc" ,
189
+ info_url = "https://www.example.com/help" ,
190
+ phone = "800-555-5555" ,
191
+ active = True ,
192
+ private_key = client_private_key ,
193
+ jws_signing_alg = "RS256" ,
194
+ payment_processor = payment_processor ,
195
+ )
196
+ transit_agency1 .eligibility_types .set ([type1 , type2 ])
197
+ transit_agency1 .eligibility_verifiers .set ([verifier1 , verifier2 ])
198
+
199
+ transit_agency2 = TransitAgency .objects .create (
200
+ slug = "deftl" ,
201
+ short_name = "DefTL" ,
202
+ long_name = "DEF Transit Lines" ,
203
+ agency_id = "def456" ,
204
+ merchant_id = "deftl" ,
205
+ info_url = "https://www.example.com/help" ,
206
+ phone = "321-555-5555" ,
207
+ active = True ,
208
+ private_key = client_private_key ,
209
+ jws_signing_alg = "RS256" ,
210
+ payment_processor = payment_processor ,
211
+ )
212
+ transit_agency2 .eligibility_types .set ([type1 ])
213
+ transit_agency2 .eligibility_verifiers .set ([verifier1 ])
214
+
181
215
182
216
class Migration (migrations .Migration ):
183
217
0 commit comments