mirror of
https://github.com/wassname/flask-security.git
synced 2026-10-02 12:10:40 +08:00
Add test to ensure it is disabled
This commit is contained in:
1 parent
3adb4afd60
commit
647e1a06d5
1 file changed
+12
@@ -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