def test_signin_form(self):
        invalid_data_dicts = [
            {'data': {'identification': '',
                      'password': 'inhalefish'},
             'error': ('identification', ['Either supply us with your email or username.'])},
            {'data': {'identification': 'john',
                      'password': 'inhalefish'},
             'error': ('__all__', ['Please enter a correct username or email and password. Note that both fields are case-sensitive.'])}
        ]

        # Override locale settings since we are checking for existence of error
        # messaged written in english. Note: it should not be necessasy but
        # we have experienced such locale issues during tests on Travis builds.
        # See: https://github.com/bread-and-pepper/django-userena/issues/446
        with override('en'):
            for invalid_dict in invalid_data_dicts:
                form = forms.AuthenticationForm(data=invalid_dict['data'])
                self.assertFalse(form.is_valid())
                self.assertEqual(form.errors[invalid_dict['error'][0]],
                                 invalid_dict['error'][1])

        valid_data_dicts = [
            {'identification': 'john',
             'password': 'blowfish'},
            {'identification': 'john@example.com',
             'password': 'blowfish'}
        ]

        for valid_dict in valid_data_dicts:
            form = forms.AuthenticationForm(valid_dict)
            self.assertTrue(form.is_valid())
Check that the ``SigninForm`` requires both identification and password
dataset/ETHPy150Open bread-and-pepper/django-userena/userena/tests/tests_forms.py/AuthenticationFormTests.test_signin_form