Refactor and add tests for plugins.py

Improvement to the tests currently being run on ``plugins.py``

related #644 
I grouped the tests under the class, but this looked more coupled than the test needed to be. The seperate class made it look like the class tests should be refactored out of the test module. However, there were only 3 tests in the test class.

So I made a module-wide fixture which contains the cache. Now it doesn't need to me explicitly initiated with values either.