Add tests for allowed operations and methods tests.
Fix bugs that caused tests to fail on flask.