Improving tests
 - Refactoring tests for reuse improvement

Adjusting identation to 4 spaces
Adding more tests
  - Tests for helper functions
  - Tests for the authorize method
removing unused permissions.py