def test_auth_login_failed(self):
        """
        REST Api: Test auth login failed
        """
        client = self.app.test_client()
        rv = self._login(client, "fail", "fail")
        self.assertEqual(json.loads(rv.data), {"message": "Not authorized"})
        self.assertEqual(rv.status_code, 401)

        REST Api: Test auth login failed
        
tests/test_api.py