Skip to content

Commit c9376b7

Browse files
committed
adjut for tests
Signed-off-by: Sylvain Hellegouarch <[email protected]>
1 parent b3c929b commit c9376b7

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

chaosaws/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ def convert_tags(tags: Union[str, Dict[str, str]]) -> Dict[str, str]:
294294
"""
295295
Convert a `k=v,x=y` string into a dictionary
296296
"""
297+
if tags is None:
298+
return {}
299+
297300
if isinstance(tags, dict):
298301
return tags
299302

tests/fis/test_fis_actions.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,15 @@ def test_that_stop_experiment_by_tags(aws_client):
138138
client = MagicMock()
139139
aws_client.return_value = client
140140

141-
resp = {"experiments": [{"id": "an-id", "tags": {"test-tag": "a-value"}}]}
141+
resp = {
142+
"experiments": [
143+
{
144+
"id": "an-id",
145+
"tags": {"test-tag": "a-value"},
146+
"state": {"status": "running"},
147+
}
148+
]
149+
}
142150
client.list_experiments.return_value = resp
143151

144152
stop_experiments_by_tags(tags={"test-tag": "a-value"})

0 commit comments

Comments
 (0)