freedomofpress/securedrop — pull request #613 by garrettr (2014-10-02 00:15:06+00:00)
Title: Admin interface tests

Adds some functional tests for the admin interface. Coverage is not complete, and more tests are needed.

Fixed irritating problem where TOTP verification fails intermittently by using mock to patch the `Journalist.verify_token` function to always return True. We should have a separate test suite just for the two-factor that does not do this, otherwise we can mock out the two-factor to avoid these problems. We may also need to mock the unit tests in this way as well.