mirror of
https://github.com/wassname/flask-security.git
synced 2026-07-01 16:50:07 +08:00
Add test to ensure it is disabled
This commit is contained in:
@@ -395,6 +395,18 @@ class ChangePasswordPostViewTest(SecurityTest):
|
||||
self.assertIn('Profile Page', r.data)
|
||||
|
||||
|
||||
class ChangePasswordDisabledTest(SecurityTest):
|
||||
|
||||
AUTH_CONFIG = {
|
||||
'SECURITY_CHANGEABLE': False,
|
||||
}
|
||||
|
||||
def test_change_password_endpoint_is_404(self):
|
||||
self.authenticate()
|
||||
r = self.client.get('/change', follow_redirects=True)
|
||||
self.assertEqual(404, r.status_code)
|
||||
|
||||
|
||||
class TrackableTests(SecurityTest):
|
||||
|
||||
AUTH_CONFIG = {
|
||||
|
||||
Reference in New Issue
Block a user