'Test a few error cases for email validation (full test coverage lives with do_email_change_request).'

@ddt.data(('not_an_email',), ('',), (None,))
@ddt.unpack
def test_patch_invalid_email(self, bad_email):

    client = self.login_client('client', 'user')
    error_response = self.send_patch(client, {'email': bad_email}, expected_status=400)
    field_errors = error_response.data['field_errors']
    self.assertEqual("Error    thrown    from    validate_new_email:    'Valid    e-mail    address    required.'", field_errors['email']['developer_message'])
    self.assertEqual('Valid    e-mail    address    required.', field_errors['email']['user_message'])
