-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(shipper): update intelcom, ups and amazon with canadian french s…
…trings (#954) * Extended consts (closes #842) Basically redone #842 for the correct branch - Add french strings to amazon + canadian french AMAZON_LANG - Add french string to ups - IntelCom section with french contents * Put intelcom stuff in the correct spot * revert spacing * Update const.py * add german amazon email * Run const.py through pyrfecter.com To hopefully fix the issue tox's linter has with this PR * Fix one forgotten comma linter helped me find that lol * update tests --------- Co-authored-by: Chris <[email protected]>
- Loading branch information
Showing
2 changed files
with
22 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,6 +100,7 @@ | |
"Livré", | ||
"Entregado:", | ||
"Bezorgd:", | ||
"Livraison : Votre", | ||
] | ||
AMAZON_SHIPMENT_TRACKING = [ | ||
"shipment-tracking", | ||
|
@@ -110,10 +111,7 @@ | |
"verzending-volgen", | ||
"update-bestelling", | ||
] | ||
AMAZON_EMAIL = [ | ||
"order-update@", | ||
"update-bestelling@", | ||
] | ||
AMAZON_EMAIL = ["order-update@", "update-bestelling@", "versandbestaetigung@"] | ||
AMAZON_PACKAGES = "amazon_packages" | ||
AMAZON_ORDER = "amazon_order" | ||
AMAZON_DELIVERED = "amazon_delivered" | ||
|
@@ -126,6 +124,7 @@ | |
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
] | ||
AMAZON_HUB_SUBJECT = "ready for pickup from Amazon Hub Locker" | ||
AMAZON_HUB_SUBJECT_SEARCH = "(a package to pick up)(.*)(\\d{6})" | ||
|
@@ -143,6 +142,7 @@ | |
"A chegar:", | ||
"Arrivée :", | ||
"Verwachte bezorgdatum:", | ||
"Votre date de livraison prévue est :", | ||
] | ||
AMAZON_TIME_PATTERN_END = [ | ||
"Previously expected:", | ||
|
@@ -177,6 +177,8 @@ | |
"pt_PT.UTF-8", | ||
"pt_BR", | ||
"pt_BR.UTF-8", | ||
"fr_CA", | ||
"fr_CA.UTF-8", | ||
"", | ||
] | ||
|
||
|
@@ -224,6 +226,7 @@ | |
"Your UPS Packages were delivered", | ||
"Your UPS Parcel was delivered", | ||
"Your UPS Parcels were delivered", | ||
"Votre colis UPS a été livré", | ||
], | ||
}, | ||
"ups_delivering": { | ||
|
@@ -233,6 +236,8 @@ | |
"UPS Update: Follow Your Delivery on a Live Map", | ||
"UPS Pre-Arrival: Your Driver is Arriving Soon! Follow on a Live Map", | ||
"UPS Update: Parcel Scheduled for Delivery Today", | ||
"Mise à jour UPS : Livraison du colis prévue demain", | ||
"Mise à jour UPS : Livraison du colis prévue aujourd'hui", | ||
], | ||
}, | ||
"ups_exception": { | ||
|
@@ -563,11 +568,18 @@ | |
# Intelcom | ||
"intelcom_delivered": { | ||
"email": ["[email protected]"], | ||
"subject": ["Your order has been delivered!"], | ||
"subject": [ | ||
"Your order has been delivered!", | ||
"Votre commande a été livrée!", | ||
"Votre colis a été livré!", | ||
], | ||
}, | ||
"intelcom_delivering": { | ||
"email": ["[email protected]"], | ||
"subject": ["Your package is on the way!"], | ||
"subject": [ | ||
"Your package is on the way!", | ||
"Votre colis est en chemin!", | ||
], | ||
}, | ||
"intelcom_packages": { | ||
"email": ["[email protected]"], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -789,7 +789,7 @@ async def test_amazon_search_results(hass, mock_imap_amazon_shipped): | |
result = amazon_search( | ||
mock_imap_amazon_shipped, "test/path", hass, "testfilename.jpg", "amazon.com" | ||
) | ||
assert result == 7 | ||
assert result == 8 | ||
|
||
|
||
@pytest.mark.asyncio | ||
|
@@ -800,10 +800,10 @@ async def test_amazon_search_delivered( | |
mock_imap_amazon_delivered, "test/path", hass, "testfilename.jpg", "amazon.com" | ||
) | ||
assert ( | ||
"Amazon email search address: ['[email protected]', '[email protected]']" | ||
"Amazon email search address: ['[email protected]', '[email protected]', '[email protected]']" | ||
in caplog.text | ||
) | ||
assert result == 7 | ||
assert result == 8 | ||
assert mock_download_img.called | ||
|
||
|
||
|
@@ -818,7 +818,7 @@ async def test_amazon_search_delivered_it( | |
"testfilename.jpg", | ||
"amazon.it", | ||
) | ||
assert result == 7 | ||
assert result == 8 | ||
|
||
|
||
@pytest.mark.asyncio | ||
|