Fixed pytest calls in unit tests
Added unit tests for new plugin api