@@ -273,7 +273,12 @@ def test_obligation_email(self, mock_send_email_to_operators_approved_users_or_r
273
273
)
274
274
275
275
@patch (SEND_EMAIL_OR_RAISE_PATH )
276
- def test_credits_requested_email (self , mock_send_email_or_raise ):
276
+ def test_credits_requested_email (
277
+ self ,
278
+ mock_send_email_or_raise ,
279
+ settings ,
280
+ ):
281
+ settings .ENVIRONMENT = 'prod'
277
282
# Create a report with earned credits
278
283
report = baker .make_recipe ('reporting.tests.utils.report' )
279
284
compliance_report = baker .make_recipe ('compliance.tests.utils.compliance_report' , report = report )
@@ -286,7 +291,7 @@ def test_credits_requested_email(self, mock_send_email_or_raise):
286
291
earned_credits_amount = 100 ,
287
292
)
288
293
289
- template_instance = EmailNotificationTemplateService .get_template_by_name ('Notice of Earned Credits Generated ' )
294
+ template_instance = EmailNotificationTemplateService .get_template_by_name ('Notice of Credits Requested ' )
290
295
expected_context = {
291
296
"operator_legal_name" : report .operator .legal_name ,
292
297
"operation_name" : report .operation .name ,
@@ -295,5 +300,5 @@ def test_credits_requested_email(self, mock_send_email_or_raise):
295
300
# Call the function with the earned credit id
296
301
send_notice_of_credits_requested_generated_email (earned_credit .id )
297
302
mock_send_email_or_raise .assert_called_once_with (
298
- template_instance , expected_context , ['"ghgregulator @gov.bc.ca" ' ]
303
+ template_instance , expected_context , ['GHGRegulator @gov.bc.ca' ]
299
304
)
0 commit comments