Skip to content

Commit 4f1f8c3

Browse files
committed
Make configuration tests more robust
If a trace server has configurations loaded then tests will fail because it expects an empty array. Update test cases to tests if configurations are instance of list. Signed-off-by: Bernd Hufmann <[email protected]>
1 parent 9f43899 commit 4f1f8c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test_tsp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ def test_fetch_configurations_none(self):
518518
"""Expect no configurations without posting any."""
519519
response = self.tsp_client.fetch_configurations(CONFIG_SOURCE_TYPE)
520520
assert response.status_code == 200
521-
assert response.model.configuration_set == []
521+
assert isinstance(response.model.configuration_set, list)
522522

523523
response = self.tsp_client.fetch_configuration(CONFIG_SOURCE_TYPE, self.name)
524524
assert response.status_code == 404
@@ -557,7 +557,7 @@ def test_posted_configuration_deleted(self, extension):
557557
assert response.status_code == 200
558558

559559
response = self.tsp_client.fetch_configurations(CONFIG_SOURCE_TYPE)
560-
assert response.model.configuration_set == []
560+
assert isinstance(response.model.configuration_set, list)
561561

562562
def test_put_configuration(self, extension):
563563
"""Expect successful update of configuartion."""

0 commit comments

Comments
 (0)