stormpath / stormpath-flask

Build simple, secure web applications with Stormpath and Flask!
http://flask-stormpath.readthedocs.org/en/latest/
Other
155 stars 31 forks source link

Cleanup unit tests. #93

Closed jcass77 closed 7 years ago

jcass77 commented 7 years ago

Remove Stormpath test resources once the tests have run.

tearDown() will now remove API keys, users, and groups as well and prevent the Stormpath web interface dashboard from being polluted with old test resources.

The only way I could track down the API keys were to iterate through all accounts looking for applications with names in the correct flask-stormpath-tests format. This seems a little inefficient, but I couldn't find the API keys in the key list of either the application or account resources directly.

I also switched from the deprecated flask.ext import format to the new flask_stormpath while I was at it.

Fixes #83.

jcass77 commented 7 years ago

...on the test failure: this seems to be related to changes to the document build that was introduced as part of 87e19c4f4698570c549add66d19e34e4e5f93959?

rdegges commented 7 years ago

This looks good, thanks! I believe I can replace some of the iteration you're doing with a search request, that will save some requests.