Repository: linode/linode_api4-python (language: python)

Issue:
404 error for client.longview.get_subscriptions()



Discussion / hints:

Fix patch:
diff --git a/linode_api4/objects/longview.py b/linode_api4/objects/longview.py
index 35b159380..cfbb3984d 100644
--- a/linode_api4/objects/longview.py
+++ b/linode_api4/objects/longview.py
@@ -16,7 +16,8 @@ class LongviewClient(Base):
 
 
 class LongviewSubscription(Base):
-    api_endpoint = "longview/subscriptions/{id}"
+    api_endpoint = "/longview/subscriptions/{id}"
+
     properties = {
         "id": Property(identifier=True),
         "label": Property(),


Test patch:
diff --git a/test/linode_client_test.py b/test/linode_client_test.py
index d1e444c49..6e2bcae7c 100644
--- a/test/linode_client_test.py
+++ b/test/linode_client_test.py
@@ -396,7 +396,10 @@ def test_get_subscriptions(self):
         """
         Tests that Longview subscriptions can be retrieved
         """
-        r = self.client.longview.subscriptions()
+
+        with self.mock_get("longview/subscriptions") as m:
+            r = self.client.longview.subscriptions()
+            self.assertEqual(m.call_url, "/longview/subscriptions")
 
         self.assertEqual(len(r), 4)