Check that:
- Password is not stored in plain text in Redis;
- The token returned has the expected format;
- The key returned is indeed the decryption key;
- API backwards compatibility is maintained: passwords stored in plain text
can be retrieved via the original URL token.
`test_returned_token_format` superseeds `test_set_password`, which
was only validating the key length.
f
- "{}".format('foo') does not work on python2.6, as the index needs to be explicitly specified.
- assertIn(x, y) was only introduced in 2.7, reverting to assertTrue(x in y)
Updated test environments definitions and docs accordingly.
- Prevent the password from displaying as b'...' in the app;
- Use Flask's `get_data(as_test=True)` to read the data, in the tests;
- Add test to ensure `get_password` is not returning bytes.