Skip to content

Commit

Permalink
Code quality improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
chsou committed Jan 9, 2024
1 parent a6ce83e commit d89acb0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion c8y_api/model/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def operation_prototype(self) -> _DictWrapper:

@operation_prototype.setter
def operation_prototype(self, fragment):
self.__setitem__('operationPrototype', fragment)
self['operationPrototype'] = fragment

@property
def start_datetime(self) -> datetime:
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_environment(logger):
@pytest.fixture(scope='session')
def live_c8y(test_environment) -> CumulocityApi:
"""Provide a live CumulocityApi instance as defined by the environment."""
if 'C8Y_BASEURL' not in os.environ.keys():
if 'C8Y_BASEURL' not in os.environ:
raise RuntimeError("Missing Cumulocity environment variables (C8Y_*). Cannot create CumulocityApi instance. "
"Please define the required variables directly or setup a .env file.")
return SimpleCumulocityApp()
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/test_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def fix_token_app(test_environment):
'username': c8y.auth.username,
'password': c8y.auth.password
}
r = requests.post(url=c8y.base_url + '/tenant/oauth', data=form_data)
r = requests.post(url=c8y.base_url + '/tenant/oauth', data=form_data, timeout=60.0)
# Obtain token from response
assert r.status_code == 200
cookie = r.headers['Set-Cookie']
Expand Down

0 comments on commit d89acb0

Please sign in to comment.