Skip to content

Commit

Permalink
Incorporating mapped test into CRUD test for reliability.
Browse files Browse the repository at this point in the history
  • Loading branch information
chsou committed Jul 2, 2024
1 parent 86dcb24 commit 8bb8427
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions integration_tests/test_tenant_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@
from util.testing_util import RandomNameGenerator


def test_get_all_mapped(live_c8y: CumulocityApi):
"""Verify that select by name works."""
options = live_c8y.tenant_options.get_all_mapped(category='two-factor-authentication')
assert options
assert 'enforced' in options


def test_crud(live_c8y: CumulocityApi):
"""Verify that create/read/update/delete works for tenant options using
the object-oriented functions."""
Expand All @@ -34,6 +27,8 @@ def test_crud(live_c8y: CumulocityApi):
option = option.create()
# check whether option was created and value matches
assert live_c8y.tenant_options.get(option.category, option.key).value == 'test value'
# check whether mapping works
assert live_c8y.tenant_options.get_all_mapped(category=option.category)['my_key'] == 'test value'

# 2) update the option
option.value = 'new value'
Expand Down

0 comments on commit 8bb8427

Please sign in to comment.