def test_expand(self):
    project = self.create_project()
    build = self.create_build(project)
    job = self.create_job(build)
    results = list(self.get_expander({'commands': [{'script': 'echo 1'}, {'script': 'echo 2', 'label': 'foo'}]}).expand(job=job, max_executors=10))
    assert (len(results) == 2)
    assert (results[0].label == 'echo 1')
    assert (len(results[0].commands) == 1)
    assert (results[0].commands[0].label == 'echo 1')
    assert (results[0].commands[0].script == 'echo 1')
    assert (results[1].label == 'foo')
    assert (len(results[1].commands) == 1)
    assert (results[1].commands[0].label == 'foo')
    assert (results[1].commands[0].script == 'echo 2')
def test_expand(self):
    project = self.create_project()
    build = self.create_build(project)
    job = self.create_job(build)
    results = list(self.get_expander({'commands': [{'script': 'echo 1'}, {'script': 'echo 2', 'label': 'foo'}]}).expand(job=job, max_executors=10))
    assert (len(results) == 2)
    assert (results[0].label == 'echo 1')
    assert (len(results[0].commands) == 1)
    assert (results[0].commands[0].label == 'echo 1')
    assert (results[0].commands[0].script == 'echo 1')
    assert (results[1].label == 'foo')
    assert (len(results[1].commands) == 1)
    assert (results[1].commands[0].label == 'foo')
    assert (results[1].commands[0].script == 'echo 2')