Testing plugin API independently from Octoprint


At the moment I'm writing a test suite for the API of a plugin using pytest. My approach: Initializing a test database and registering the API in a flask application. This works till access control comes in play using Octoprints restricted_access decorator. Is there a way to use access control without launching the whole Octoprint application or can the behavior be simulated?