Граф коммитов

1240 Коммитов

Автор SHA1 Сообщение Дата
Se Yeon Kim f2e06e88b0
Use consistent variable assignments in if-clause 2023-12-28 14:48:26 -06:00
Se Yeon Kim 0d8706dae8
Add type annotation on method parameter and return value 2023-12-28 14:18:58 -06:00
Se Yeon Kim b4ce139702
Do not create DomainAddress if the address was previously deleted 2023-12-22 14:29:00 -06:00
Se Yeon Kim 4e379a2d1b
Move address has blocklisted word check outside of valid_address
The validation for blocklisted word in the address is in RelayAddress.save() instead
2023-12-22 13:26:50 -06:00
Se Yeon Kim 53de0845bd
Add test and type checking on is_blocklisted
Unit test is_blocklisted with mocked blockword list. Integration test that when a RelayAddress is created it checks for blockwork.
2023-12-22 02:36:02 -06:00
Se Yeon Kim f51a5f41f0
Add return type on save so types are checked 2023-12-21 11:31:17 -06:00
Se Yeon Kim 05d1be8f1e
Type check arguments in valid_address function 2023-12-21 11:03:57 -06:00
Se Yeon Kim 0a522b3ba4
Use string of the domain to check for previously deleted addresses
Fix MPP-3657
2023-12-21 10:28:32 -06:00
Se Yeon Kim e2462d0c33
Test address repeated from deleted RelayAddress fails validation 2023-12-20 14:47:40 -06:00
groovecoder 0a4a3dbed7
for MPP-3633: add get_subplat_upgrade_link_by_language and call from wrap_html_email
Introduce a new get_subplat_upgrade_link_by_language function to return
a subplat upgrade link based on an accept-language value and plan period.

Call it from wrap_html_email to the email header link can go straight to
SubPlat.
2023-12-08 14:17:24 -06:00
groovecoder e09f221ccb
add @pytest.mark.django_db to test_wrapped_email 2023-12-08 08:22:41 -06:00
groovecoder 99e2d29d60
fix MPP-3633: add holiday promo link to wrapped_email.html 2023-12-08 07:51:13 -06:00
Rafee 0c72dfb745 Resolve merge conflict 2023-11-28 12:43:23 -05:00
Rafee db9b6169d0 Added tracker removal arg for first forwarded email onboarding 2023-11-20 09:13:52 -05:00
John Whitlock 4bf049e7f6
Add more explanation 2023-11-16 16:47:09 -06:00
John Whitlock edccbd53da
Allow multiple headers with the same name to fail 2023-11-16 15:16:51 -06:00
John Whitlock eea4cbd1f1
Use repr for exception logging 2023-11-16 15:16:04 -06:00
John Whitlock ee89e1dbc7
Test header read exception handling 2023-11-16 15:15:52 -06:00
John Whitlock 67d577889e
Fix handler for header read exceptions 2023-11-15 11:48:21 -06:00
John Whitlock e6a68ec15f
Sort welcome emails by user_id
This allows the test test_invalid_email_address_skips_invalid
to have a deterministic logger sequence.
2023-11-08 13:28:43 -06:00
John Whitlock 11599a5e37
MPP-3500: Log header values that raise exceptions
When writing a header value raises an exception, log the problematic
header value.
2023-11-07 16:01:47 -06:00
unknown cb42899e40 Update to remove margin on overflow on right header block 2023-11-01 14:14:22 -04:00
unknown 14ce7423d3 Failings tests fix 2023-11-01 13:16:45 -04:00
unknown a487e616cc Styling updates to email banners 2023-11-01 12:50:35 -04:00
John Whitlock ebd9029b1b
Add docstring for modifying fuction parameter
Document that _replace_headers modifies the email EmailMessage passed
into the function, and give the two reasons - Python's email library
modifies or raises exceptions on non-compliant emails, and the email
object could be large objects that cause issues if copied.
2023-10-31 14:31:12 -05:00
John Whitlock 364ab53e2e
Handle value=None
If the exception handler sets the value to None, it will not have the
defects parameter.
2023-10-30 16:21:50 -05:00
luke crouch 9bdaa3758e
Merge pull request #3961 from mozilla/MPP-3443
MPP-3443 & MPP-3444 - Free user onboarding experience
2023-10-27 18:13:36 +00:00
lloan alas 42639da820
Update emails/migrations/0058_profile_onboarding_free_state.py
Co-authored-by: Se Yeon Kim <25109943+say-yawn@users.noreply.github.com>
2023-10-26 18:54:14 -07:00
lloan alas 861d46e4ce
update to address failing migration test 2023-10-26 09:16:14 -07:00
John Whitlock d51f0c3908
Remove emails/headderegistry.py
Combine the code with that in emails/policy.py
2023-10-24 16:10:24 -05:00
John Whitlock 38b3a119de
Serialize message to string outside of call 2023-10-24 16:10:16 -05:00
John Whitlock aa0ddad9c1
Detect and log issues with headers 2023-10-24 16:10:07 -05:00
John Whitlock 9d19ff139b
Make create_notification_from_email more flexible
Use the new .as_unstructured field to allow
create_notification_from_email to create SNS notifications from emails
with headers that are not compliant with RFCs.
2023-10-24 16:09:58 -05:00
John Whitlock 25d3907874
Restructure tests 2023-10-24 16:09:49 -05:00
John Whitlock b1b865bfd0
Add .as_unstructured to headers
Extend header creation to include an element .as_unstructured, which
parses the header as if it was an unstructured header. This allows
getting the original value, after removing some whitespace.
2023-10-24 16:09:41 -05:00
John Whitlock 7f2d525f0f
Add other test cases 2023-10-24 16:09:32 -05:00
John Whitlock c08326a36b
Handle badly-formed message IDs 2023-10-24 16:09:20 -05:00
John Whitlock 37f65fb81f
Add test for email with invalid Message-ID 2023-10-24 16:08:21 -05:00
lloan alas cd768f0ac5
Merge branch 'main' into MPP-3443 2023-10-23 10:25:06 -07:00
lloan alas 8d065b4682
added new profile colum onboarding_free_state to keep track of onboarding state for free users, migration included, app updated to use new profile field 2023-10-19 17:15:39 -07:00
unknown eabdb39343 New expected emails to fix failing tests 2023-10-18 14:17:18 -04:00
unknown 79a012e002 Styling fixes 2023-10-18 14:10:54 -04:00
Rafee Rahman 4418064086
Update emperor_norton_expected.email 2023-10-16 13:39:53 -04:00
Rafee Rahman 2df038e207
Merge branch 'main' into MPP-3442-new-email-template 2023-10-16 13:31:03 -04:00
unknown 08b39aaaad New border color and arrow-down img 2023-10-16 13:28:45 -04:00
unknown 664ea2877f styling updates for rendering issues in gmail and outlook 2023-10-12 18:37:04 -04:00
groovecoder 1aafc977bd
MPP-3441: add first_forwarded_email API endpoint 2023-10-11 13:21:35 -05:00
unknown 40058c94b6 Removed header, l10 approved changes 2023-10-11 13:59:29 -04:00
John Whitlock 73f0afe8ee
Convert fixtures to SNS JSON 2023-10-10 15:40:51 -05:00
John Whitlock aa8f06d83f
Test for exactly one @ symbol for emails 2023-10-10 15:35:05 -05:00