added a test for when the tree is specified as a dictionary
Fixed test so that it runs

Reformated stuff and made it run

Signed-off-by: Tim Henderson <tim.tadh@gmail.com>