'should set env.all_hosts to its derived host list'

@with_fakes
def test_should_set_all_hosts(self):

    hosts = ['a', 'b']
    roledefs = {'r1': ['c', 'd']}
    roles = ['r1']
    exclude_hosts = ['a']
    def command():
        eq_(set(env.all_hosts), set(['b', 'c', 'd']))
    task = Fake(callable=True, expect_call=True).calls(command)
    with settings(hide('everything'), roledefs=roledefs):
        execute(task, hosts=hosts, roles=roles, exclude_hosts=exclude_hosts)
