Add special case for empty permissions
Make backend tests a python module