diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2019-01-24 00:00:27 -0500 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2019-01-24 00:01:55 -0500 |
commit | 1140aed523e673f61e04ca1129cdece4142227a5 (patch) | |
tree | d1dcfe9cde846a3c903ca688698211f1364716f3 | |
parent | 6ecc2b0ab076fab452df4e0f0b8091c1fe89ef3a (diff) | |
download | buildstream-1140aed523e673f61e04ca1129cdece4142227a5.tar.gz |
tests/elements/filter.py: Refactored to use get_element_states()
-rw-r--r-- | tests/elements/filter.py | 10 |
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]) |