def test_auth_login_invalid_provider(self):
        """
        REST Api: Test auth login invalid provider
        """
        client = self.app.test_client()
        rv = client.post(
            "api/v1/security/login",
            json={"username": "admin", "password": "password", "provider": "xpto"},
        )
        self.assertEqual(rv.status_code, 400)
        response = json.loads(rv.data.decode("utf-8"))
        self.assertEqual(
            response,
            {
                "message": {
                    "provider": [
                        "Must be one of: db, ldap.",
                        "Alternative authentication provider is not allowed",
                    ]
                }
            },
        )

        REST Api: Test auth login invalid provider
        
tests/test_api.py