'handle corner case of Task object referrred to by name'

@with_fakes
def test_should_handle_name_of_Task_object(self):

    name = 'task2'
    class MyTask(Task, ):
        run = Fake(callable=True, expect_call=True)
    mytask = MyTask()
    mytask.name = name
    commands = {name: mytask}
    with patched_context(fabric.state, 'commands', commands):
        execute(name)
