mirror of
https://github.com/jdejaegh/irm-kmi-api.git
synced 2025-06-27 04:05:56 +02:00
Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
9f0ff16acd | |||
5f6ff3ba30 |
5 changed files with 1666 additions and 3 deletions
|
@ -1 +1 @@
|
|||
__version__ = '0.1.6'
|
||||
__version__ = '0.2.0'
|
|
@ -26,6 +26,7 @@ MAP_WARNING_ID_TO_SLUG: Final = {
|
|||
3: 'thunder',
|
||||
7: 'fog',
|
||||
9: 'cold',
|
||||
10: 'heat',
|
||||
12: 'thunder_wind_rain',
|
||||
13: 'thunderstorm_strong_gusts',
|
||||
14: 'thunderstorm_large_rainfall',
|
||||
|
|
|
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||
|
||||
[project]
|
||||
name = "irm-kmi-api"
|
||||
version = "0.1.6"
|
||||
version = "0.2.0"
|
||||
description = "Retrieve data from the Belgian IRM KMI in Python"
|
||||
readme = "README.md"
|
||||
authors = [{ name = "Jules Dejaeghere", email = "curable.grass491@mailer.me" }]
|
||||
|
@ -26,7 +26,7 @@ requires-python = ">=3.11"
|
|||
Homepage = "https://github.com/jdejaegh/irm-kmi-api"
|
||||
|
||||
[tool.bumpver]
|
||||
current_version = "0.1.6"
|
||||
current_version = "0.2.0"
|
||||
version_pattern = "MAJOR.MINOR.PATCH"
|
||||
commit_message = "bump version {old_version} -> {new_version}"
|
||||
tag_message = "{new_version}"
|
||||
|
|
1647
tests/fixtures/antwerp_with_heat_warning.json
vendored
Normal file
1647
tests/fixtures/antwerp_with_heat_warning.json
vendored
Normal file
File diff suppressed because it is too large
Load diff
|
@ -22,3 +22,18 @@ async def test_warning_data() -> None:
|
|||
assert first.get('friendly_name') == 'Fog'
|
||||
assert first.get('id') == 7
|
||||
assert first.get('level') == 1
|
||||
|
||||
async def test_warning_heat() -> None:
|
||||
api = get_api_with_data("antwerp_with_heat_warning.json")
|
||||
|
||||
result = api.get_warnings(lang='en')
|
||||
|
||||
assert isinstance(result, list)
|
||||
assert len(result) == 1
|
||||
|
||||
first = result[0]
|
||||
|
||||
assert first.get('slug') == 'heat'
|
||||
assert first.get('friendly_name') == 'Heat'
|
||||
assert first.get('id') == 10
|
||||
assert first.get('level') == 1
|
Loading…
Add table
Reference in a new issue