summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-01-24 00:00:27 -0500
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-01-24 00:01:55 -0500
commit1140aed523e673f61e04ca1129cdece4142227a5 (patch)
treed1dcfe9cde846a3c903ca688698211f1364716f3
parent6ecc2b0ab076fab452df4e0f0b8091c1fe89ef3a (diff)
downloadbuildstream-1140aed523e673f61e04ca1129cdece4142227a5.tar.gz
tests/elements/filter.py: Refactored to use get_element_states()
-rw-r--r--tests/elements/filter.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/elements/filter.py b/tests/elements/filter.py
index 6c0a3ee1c..a63ef29e1 100644
--- a/tests/elements/filter.py
+++ b/tests/elements/filter.py
@@ -389,8 +389,9 @@ def test_filter_track_multi(datafiles, cli, tmpdir):
_yaml.dump(filter2_config, filter2_file)
# Assert that a fetch is needed
- assert cli.get_element_state(project, input_name) == 'no reference'
- assert cli.get_element_state(project, input2_name) == 'no reference'
+ states = cli.get_element_states(project, [input_name, input2_name])
+ assert states[input_name] == 'no reference'
+ assert states[input2_name] == 'no reference'
# Now try to track it
result = cli.run(project=project, args=["source", "track", "filter1.bst", "filter2.bst"])
@@ -450,8 +451,9 @@ def test_filter_track_multi_exclude(datafiles, cli, tmpdir):
_yaml.dump(filter2_config, filter2_file)
# Assert that a fetch is needed
- assert cli.get_element_state(project, input_name) == 'no reference'
- assert cli.get_element_state(project, input2_name) == 'no reference'
+ states = cli.get_element_states(project, [input_name, input2_name])
+ assert states[input_name] == 'no reference'
+ assert states[input2_name] == 'no reference'
# Now try to track it
result = cli.run(project=project, args=["source", "track", "filter1.bst", "filter2.bst", "--except", input_name])