Skip to content

Commit

Permalink
Prepare Version 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chsou committed Aug 1, 2024
1 parent 52d1165 commit e3a9b5d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# Changelog


## Version 2.0

* Added Changes support to the Audit API.
* Fixed Issue #53 "KeyError when retrieving 'bulkOperation'"; bulk operations JSON is somewhat _non-standard_ as
the root element is not named like the corresponding REST resource.
* Added proper support for the CurrentUser API; this is a breaking change as some functions moved from the User API
to the CurrentUser API (the correct place).
* Added support for 2FA at user level; TFA/TOTP can be enabled for individual users. Parts of this functionality,
e.g. getting the TOTP secret are only available at the CurrentUser level
* Adding traditional date filter parameter names (date_from and date_to in addition to before/after) to Events
and Alarms API.


## Version 1.10
Expand Down
5 changes: 5 additions & 0 deletions integration_tests/test_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def test_get_availability(live_c8y: CumulocityApi, sample_device: Device):
print("Availability not yet available (pun intended). Retrying ...")
assert availability


@pytest.fixture
def object_with_measurements(live_c8y: CumulocityApi, mutable_object: ManagedObject) -> ManagedObject:
"""Provide a managed object with predefined measurements."""
Expand All @@ -143,21 +144,25 @@ def object_with_measurements(live_c8y: CumulocityApi, mutable_object: ManagedObj
live_c8y.measurements.create(*ms)
return mutable_object


def test_get_supported_measurements(live_c8y: CumulocityApi, object_with_measurements: ManagedObject):
"""Verify that the supported measurements can be retrieved."""
result = live_c8y.inventory.get_supported_measurements(object_with_measurements.id)
assert set(result) == {'c8y_Counter', 'c8y_Integers'}


def test_get_supported_measurements_2(live_c8y: CumulocityApi, object_with_measurements: ManagedObject):
"""Verify that the supported measurements can be retrieved."""
result = object_with_measurements.get_supported_measurements()
assert set(result) == {'c8y_Counter', 'c8y_Integers'}


def test_get_supported_series(live_c8y: CumulocityApi, object_with_measurements: ManagedObject):
"""Verify that the supported measurement series can be retrieved."""
result = live_c8y.inventory.get_supported_series(object_with_measurements.id)
assert set(result) == {'c8y_Counter.N', 'c8y_Integers.V1', 'c8y_Integers.V2'}


def test_get_supported_series_2(live_c8y: CumulocityApi, object_with_measurements: ManagedObject):
"""Verify that the supported measurement series can be retrieved."""
result = object_with_measurements.get_supported_series()
Expand Down

0 comments on commit e3a9b5d

Please sign in to comment.