Fixes all tests and removes dependency on Flask-Testing for setting up default context. Now uses smarter functions for testing API