'should honor @roles on passed-in task objects'

def test_should_honor_roles_decorator(self):

    roledefs = {'role1': ['a', 'b', 'c']}
    role_copy = roledefs['role1'][:]
    @roles('role1')
    def task():
        eq_(env.host_string, role_copy.pop(0))
    with settings(hide('running'), roledefs=roledefs):
        execute(task)
