Loosen login lockout text check

On our fork at Stanford, we override the template for the login lockout
to provide additional information. This means that the second sentence
here, `Try again later.` does not immediately follow the first in our
rendering. As a result, this test fails for us.

Instead, by checking for the most important part of the message
(the first sentence), we're able to ensure that:
- the user is still locked out
- the lockout message is shown on the template
- the test does not fail unnecessarily
This commit is contained in:
stv
2018-02-16 09:39:48 -08:00
parent 15e07d7cc5
commit 7a0baa5578

View File

@@ -223,7 +223,7 @@ class AuthTestCase(ContentStoreTestCase):
data = parse_json(resp)
self.assertFalse(data['success'])
self.assertIn(
'This account has been temporarily locked due to excessive login failures. Try again later.',
'This account has been temporarily locked due to excessive login failures.',
data['value']
)