Skip to content

Commit

Permalink
Bump py17track to 2021.12.1 (home-assistant#60762)
Browse files Browse the repository at this point in the history
  • Loading branch information
bachya authored Dec 1, 2021
1 parent b65b2c4 commit a053c0a
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 94 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/seventeentrack/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
182 changes: 91 additions & 91 deletions tests/components/seventeentrack/test_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand All @@ -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]

Expand All @@ -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]
Expand All @@ -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]

Expand All @@ -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]

Expand All @@ -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]

Expand All @@ -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]

Expand All @@ -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]

Expand All @@ -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]

Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit a053c0a

Please sign in to comment.