Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CustomAuthenticationForm(AuthenticationForm):
- class Meta:
- form = AuthenticationForm
- fields = "__all__"
- labels = {
- "username": "username",
- "password": "password"
- }
- class CustomAuthenticationFormTest(BaseTest):
- def test_auth(self):
- data = {'username': 'username', 'password': 'password'}
- form = forms.CustomAuthenticationForm(data=data)
- self.assertTrue(form.is_valid())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement