From a053c0a106f47dd8427547665e3572957f4af36d Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Wed, 1 Dec 2021 10:52:33 -0700 Subject: [PATCH] Bump py17track to 2021.12.1 (#60762) --- .../components/seventeentrack/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- .../components/seventeentrack/test_sensor.py | 182 +++++++++--------- 4 files changed, 94 insertions(+), 94 deletions(-) diff --git a/homeassistant/components/seventeentrack/manifest.json b/homeassistant/components/seventeentrack/manifest.json index 15a94a4230f208..05f240043a96e7 100644 --- a/homeassistant/components/seventeentrack/manifest.json +++ b/homeassistant/components/seventeentrack/manifest.json @@ -2,7 +2,7 @@ "domain": "seventeentrack", "name": "17TRACK", "documentation": "https://www.home-assistant.io/integrations/seventeentrack", - "requirements": ["py17track==3.2.1"], + "requirements": ["py17track==2021.12.1"], "codeowners": [], "iot_class": "cloud_polling" } diff --git a/requirements_all.txt b/requirements_all.txt index 0a65c414efd7c7..c9c32cb4520f61 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1305,7 +1305,7 @@ py-synologydsm-api==1.0.4 py-zabbix==1.1.7 # homeassistant.components.seventeentrack -py17track==3.2.1 +py17track==2021.12.1 # homeassistant.components.hdmi_cec pyCEC==0.5.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index cca40724fa48d1..a7e50494b6f731 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -792,7 +792,7 @@ py-nightscout==1.2.2 py-synologydsm-api==1.0.4 # homeassistant.components.seventeentrack -py17track==3.2.1 +py17track==2021.12.1 # homeassistant.components.control4 pyControl4==0.0.6 diff --git a/tests/components/seventeentrack/test_sensor.py b/tests/components/seventeentrack/test_sensor.py index cef92496561c63..4e22822150bbb2 100644 --- a/tests/components/seventeentrack/test_sensor.py +++ b/tests/components/seventeentrack/test_sensor.py @@ -172,14 +172,14 @@ async def test_invalid_config(hass): async def test_add_package(hass): """Ensure package is added correctly when user add a new package.""" package = Package( - "456", - 206, - "friendly name 1", - "info text 1", - "location 1", - "2020-08-10 10:32", - 206, - 2, + tracking_number="456", + destination_country=206, + friendly_name="friendly name 1", + info_text="info text 1", + location="location 1", + timestamp="2020-08-10 10:32", + origin_country=206, + package_type=2, ) ProfileMock.package_list = [package] @@ -188,14 +188,14 @@ async def test_add_package(hass): assert len(hass.states.async_entity_ids()) == 1 package2 = Package( - "789", - 206, - "friendly name 2", - "info text 2", - "location 2", - "2020-08-10 14:25", - 206, - 2, + tracking_number="789", + destination_country=206, + friendly_name="friendly name 2", + info_text="info text 2", + location="location 2", + timestamp="2020-08-10 14:25", + origin_country=206, + package_type=2, ) ProfileMock.package_list = [package, package2] @@ -208,24 +208,24 @@ async def test_add_package(hass): async def test_remove_package(hass): """Ensure entity is not there anymore if package is not there.""" package1 = Package( - "456", - 206, - "friendly name 1", - "info text 1", - "location 1", - "2020-08-10 10:32", - 206, - 2, + tracking_number="456", + destination_country=206, + friendly_name="friendly name 1", + info_text="info text 1", + location="location 1", + timestamp="2020-08-10 10:32", + origin_country=206, + package_type=2, ) package2 = Package( - "789", - 206, - "friendly name 2", - "info text 2", - "location 2", - "2020-08-10 14:25", - 206, - 2, + tracking_number="789", + destination_country=206, + friendly_name="friendly name 2", + info_text="info text 2", + location="location 2", + timestamp="2020-08-10 14:25", + origin_country=206, + package_type=2, ) ProfileMock.package_list = [package1, package2] @@ -248,14 +248,14 @@ async def test_remove_package(hass): async def test_friendly_name_changed(hass): """Test friendly name change.""" package = Package( - "456", - 206, - "friendly name 1", - "info text 1", - "location 1", - "2020-08-10 10:32", - 206, - 2, + tracking_number="456", + destination_country=206, + friendly_name="friendly name 1", + info_text="info text 1", + location="location 1", + timestamp="2020-08-10 10:32", + origin_country=206, + package_type=2, ) ProfileMock.package_list = [package] @@ -265,14 +265,14 @@ async def test_friendly_name_changed(hass): assert len(hass.states.async_entity_ids()) == 1 package = Package( - "456", - 206, - "friendly name 2", - "info text 1", - "location 1", - "2020-08-10 10:32", - 206, - 2, + tracking_number="456", + destination_country=206, + friendly_name="friendly name 2", + info_text="info text 1", + location="location 1", + timestamp="2020-08-10 10:32", + origin_country=206, + package_type=2, ) ProfileMock.package_list = [package] @@ -289,15 +289,15 @@ async def test_friendly_name_changed(hass): async def test_delivered_not_shown(hass): """Ensure delivered packages are not shown.""" package = Package( - "456", - 206, - "friendly name 1", - "info text 1", - "location 1", - "2020-08-10 10:32", - 206, - 2, - 40, + tracking_number="456", + destination_country=206, + friendly_name="friendly name 1", + info_text="info text 1", + location="location 1", + timestamp="2020-08-10 10:32", + origin_country=206, + package_type=2, + status=40, ) ProfileMock.package_list = [package] @@ -312,15 +312,15 @@ async def test_delivered_not_shown(hass): async def test_delivered_shown(hass): """Ensure delivered packages are show when user choose to show them.""" package = Package( - "456", - 206, - "friendly name 1", - "info text 1", - "location 1", - "2020-08-10 10:32", - 206, - 2, - 40, + tracking_number="456", + destination_country=206, + friendly_name="friendly name 1", + info_text="info text 1", + location="location 1", + timestamp="2020-08-10 10:32", + origin_country=206, + package_type=2, + status=40, ) ProfileMock.package_list = [package] @@ -335,14 +335,14 @@ async def test_delivered_shown(hass): async def test_becomes_delivered_not_shown_notification(hass): """Ensure notification is triggered when package becomes delivered.""" package = Package( - "456", - 206, - "friendly name 1", - "info text 1", - "location 1", - "2020-08-10 10:32", - 206, - 2, + tracking_number="456", + destination_country=206, + friendly_name="friendly name 1", + info_text="info text 1", + location="location 1", + timestamp="2020-08-10 10:32", + origin_country=206, + package_type=2, ) ProfileMock.package_list = [package] @@ -352,15 +352,15 @@ async def test_becomes_delivered_not_shown_notification(hass): assert len(hass.states.async_entity_ids()) == 1 package_delivered = Package( - "456", - 206, - "friendly name 1", - "info text 1", - "location 1", - "2020-08-10 10:32", - 206, - 2, - 40, + tracking_number="456", + destination_country=206, + friendly_name="friendly name 1", + info_text="info text 1", + location="location 1", + timestamp="2020-08-10 10:32", + origin_country=206, + package_type=2, + status=40, ) ProfileMock.package_list = [package_delivered] @@ -391,14 +391,14 @@ async def test_summary_correctly_updated(hass): async def test_utc_timestamp(hass): """Ensure package timestamp is converted correctly from HA-defined time zone to UTC.""" package = Package( - "456", - 206, - "friendly name 1", - "info text 1", - "location 1", - "2020-08-10 10:32", - 206, - 2, + tracking_number="456", + destination_country=206, + friendly_name="friendly name 1", + info_text="info text 1", + location="location 1", + timestamp="2020-08-10 10:32", + origin_country=206, + package_type=2, tz="Asia/Jakarta", ) ProfileMock.package_list = [package]