Fixed test_fsm for python < 2.7

The test_fsm() in testfsm-branch should work everywhere