workflows: hotfix unittest

* Improves tests stability.

* Simplifies workflow engine.

* Fixes the endlessy working workflow engine bug.

Signed-off-by: Guillaume Lastecoueres <guillaume.lastecoueres@cern.ch>
Co-authored-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
[assertIsInstance](https://docs.python.org/3.3/library/unittest.html#unittest.TestCase.assertIsInstance)