def test_with_no_username(self): data = generate_password_auth_data({ 'password': self.password, 'domain': {'id': self.domain_id}, }) self.authenticate(data, expected_status=httplib.BAD_REQUEST)