summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-01-24 00:00:58 -0500
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-01-24 00:01:55 -0500
commitc2c004f95c15716815971cd1a3c54742f59ea704 (patch)
tree6a4bb562623a92e5d19f3106489a46af930efca5
parentb7ea8b742c9c785e56103a02780df025852afb0f (diff)
downloadbuildstream-c2c004f95c15716815971cd1a3c54742f59ea704.tar.gz
tests/frontend/pull.py: Refactored to use get_element_states()
-rw-r--r--tests/frontend/pull.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py
index 254b6d584..f0d6fbf4e 100644
--- a/tests/frontend/pull.py
+++ b/tests/frontend/pull.py
@@ -66,16 +66,16 @@ def test_push_pull_all(cli, tmpdir, datafiles):
shutil.rmtree(artifacts)
# Assert that nothing is cached locally anymore
- for element_name in all_elements:
- assert cli.get_element_state(project, element_name) != 'cached'
+ states = cli.get_element_states(project, all_elements)
+ assert not any(states[e] == 'cached' for e in all_elements)
# Now try bst pull
result = cli.run(project=project, args=['artifact', 'pull', '--deps', 'all', 'target.bst'])
result.assert_success()
# And assert that it's again in the local cache, without having built
- for element_name in all_elements:
- assert cli.get_element_state(project, element_name) == 'cached'
+ states = cli.get_element_states(project, all_elements)
+ assert not any(states[e] != 'cached' for e in all_elements)
# Tests that: