Advertisement
kamski

Untitled

Apr 12th, 2021
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1.  
  2. class CustomAuthenticationForm(AuthenticationForm):
  3. class Meta:
  4. form = AuthenticationForm
  5. fields = "__all__"
  6. labels = {
  7. "username": "username",
  8. "password": "password"
  9. }
  10.  
  11.  
  12.  
  13. class CustomAuthenticationFormTest(BaseTest):
  14. def test_auth(self):
  15. data = {'username': 'username', 'password': 'password'}
  16. form = forms.CustomAuthenticationForm(data=data)
  17. self.assertTrue(form.is_valid())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement