Skip to content

Commit d89acb0

Browse files
committed
Code quality improvements.
1 parent a6ce83e commit d89acb0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

c8y_api/model/operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def operation_prototype(self) -> _DictWrapper:
352352

353353
@operation_prototype.setter
354354
def operation_prototype(self, fragment):
355-
self.__setitem__('operationPrototype', fragment)
355+
self['operationPrototype'] = fragment
356356

357357
@property
358358
def start_datetime(self) -> datetime:

integration_tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def test_environment(logger):
7070
@pytest.fixture(scope='session')
7171
def live_c8y(test_environment) -> CumulocityApi:
7272
"""Provide a live CumulocityApi instance as defined by the environment."""
73-
if 'C8Y_BASEURL' not in os.environ.keys():
73+
if 'C8Y_BASEURL' not in os.environ:
7474
raise RuntimeError("Missing Cumulocity environment variables (C8Y_*). Cannot create CumulocityApi instance. "
7575
"Please define the required variables directly or setup a .env file.")
7676
return SimpleCumulocityApp()

integration_tests/test_apps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def fix_token_app(test_environment):
2323
'username': c8y.auth.username,
2424
'password': c8y.auth.password
2525
}
26-
r = requests.post(url=c8y.base_url + '/tenant/oauth', data=form_data)
26+
r = requests.post(url=c8y.base_url + '/tenant/oauth', data=form_data, timeout=60.0)
2727
# Obtain token from response
2828
assert r.status_code == 200
2929
cookie = r.headers['Set-Cookie']

0 commit comments

Comments
 (0)