Rewrite FSM tests using pytest.fixture

This makes tests more modular and precise
style changes