Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kukant committed May 3, 2024
1 parent b415736 commit 4b61f5b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kbcstorage/triggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ def update(self, trigger_id, runWithTokenId=None, component=None, configurationI
}.items()
if v is not None
}
self._put(url, data=body)
return self._put(url, data=body)
4 changes: 2 additions & 2 deletions tests/mocks/test_triggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ def test_update(self):
)
)
trigger_id = 1
deleted_detail = self.triggers.update(trigger_id, runWithTokenId=100)
assert deleted_detail is None
updated_detail = self.triggers.update(trigger_id, runWithTokenId=100)
assert updated_detail['id'] == '3'

@responses.activate
def test_create(self):
Expand Down
19 changes: 18 additions & 1 deletion tests/mocks/triggers_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,24 @@
}

update_response = {
"runWithTokenId": 100
"id": "3",
"runWithTokenId": 123,
"component": "orchestration",
"configurationId": "config-100",
"lastRun": "2017-02-13T16:42:00+0100",
"coolDownPeriodMinutes": 20,
"creatorToken": {
"id": 1,
"description": "[email protected]"
},
"tables": [
{
"tableId": "in.c-test.watched-1"
},
{
"tableId": "in.c-prod.watched-5"
}
]
}

create_response = {
Expand Down

0 comments on commit 4b61f5b

Please sign in to comment.