@@ -43,6 +43,54 @@ def setup_class(self):
4343 self .account_activity_client = getattr (self .client , "account_activity" )
4444
4545
46+ def test_delete_subscription_exists (self ):
47+ """Test that delete_subscription method exists with correct signature."""
48+ # Check method exists
49+ method = getattr (AccountActivityClient , "delete_subscription" , None )
50+ assert (
51+ method is not None
52+ ), f"Method delete_subscription does not exist on AccountActivityClient"
53+ # Check method is callable
54+ assert callable (method ), f"delete_subscription is not callable"
55+ # Check method signature
56+ sig = inspect .signature (method )
57+ params = list (sig .parameters .keys ())
58+ # Should have 'self' as first parameter
59+ assert (
60+ len (params ) >= 1
61+ ), f"delete_subscription should have at least 'self' parameter"
62+ assert (
63+ params [0 ] == "self"
64+ ), f"First parameter should be 'self', got '{ params [0 ]} '"
65+ # Check required parameters exist (excluding 'self')
66+ required_params = [
67+ "webhook_id" ,
68+ "user_id" ,
69+ ]
70+ for required_param in required_params :
71+ assert (
72+ required_param in params
73+ ), f"Required parameter '{ required_param } ' missing from delete_subscription"
74+ # Check optional parameters have defaults (excluding 'self')
75+ optional_params = []
76+ for optional_param in optional_params :
77+ if optional_param in params :
78+ param_obj = sig .parameters [optional_param ]
79+ assert (
80+ param_obj .default is not inspect .Parameter .empty
81+ ), f"Optional parameter '{ optional_param } ' should have a default value"
82+
83+
84+ def test_delete_subscription_return_annotation (self ):
85+ """Test that delete_subscription has proper return type annotation."""
86+ method = getattr (AccountActivityClient , "delete_subscription" )
87+ sig = inspect .signature (method )
88+ # Check return annotation exists
89+ assert (
90+ sig .return_annotation is not inspect .Signature .empty
91+ ), f"Method delete_subscription should have return type annotation"
92+
93+
4694 def test_get_subscription_count_exists (self ):
4795 """Test that get_subscription_count method exists with correct signature."""
4896 # Check method exists
@@ -88,34 +136,33 @@ def test_get_subscription_count_return_annotation(self):
88136 ), f"Method get_subscription_count should have return type annotation"
89137
90138
91- def test_delete_subscription_exists (self ):
92- """Test that delete_subscription method exists with correct signature."""
139+ def test_get_subscriptions_exists (self ):
140+ """Test that get_subscriptions method exists with correct signature."""
93141 # Check method exists
94- method = getattr (AccountActivityClient , "delete_subscription " , None )
142+ method = getattr (AccountActivityClient , "get_subscriptions " , None )
95143 assert (
96144 method is not None
97- ), f"Method delete_subscription does not exist on AccountActivityClient"
145+ ), f"Method get_subscriptions does not exist on AccountActivityClient"
98146 # Check method is callable
99- assert callable (method ), f"delete_subscription is not callable"
147+ assert callable (method ), f"get_subscriptions is not callable"
100148 # Check method signature
101149 sig = inspect .signature (method )
102150 params = list (sig .parameters .keys ())
103151 # Should have 'self' as first parameter
104152 assert (
105153 len (params ) >= 1
106- ), f"delete_subscription should have at least 'self' parameter"
154+ ), f"get_subscriptions should have at least 'self' parameter"
107155 assert (
108156 params [0 ] == "self"
109157 ), f"First parameter should be 'self', got '{ params [0 ]} '"
110158 # Check required parameters exist (excluding 'self')
111159 required_params = [
112160 "webhook_id" ,
113- "user_id" ,
114161 ]
115162 for required_param in required_params :
116163 assert (
117164 required_param in params
118- ), f"Required parameter '{ required_param } ' missing from delete_subscription "
165+ ), f"Required parameter '{ required_param } ' missing from get_subscriptions "
119166 # Check optional parameters have defaults (excluding 'self')
120167 optional_params = []
121168 for optional_param in optional_params :
@@ -126,14 +173,14 @@ def test_delete_subscription_exists(self):
126173 ), f"Optional parameter '{ optional_param } ' should have a default value"
127174
128175
129- def test_delete_subscription_return_annotation (self ):
130- """Test that delete_subscription has proper return type annotation."""
131- method = getattr (AccountActivityClient , "delete_subscription " )
176+ def test_get_subscriptions_return_annotation (self ):
177+ """Test that get_subscriptions has proper return type annotation."""
178+ method = getattr (AccountActivityClient , "get_subscriptions " )
132179 sig = inspect .signature (method )
133180 # Check return annotation exists
134181 assert (
135182 sig .return_annotation is not inspect .Signature .empty
136- ), f"Method delete_subscription should have return type annotation"
183+ ), f"Method get_subscriptions should have return type annotation"
137184
138185
139186 def test_validate_subscription_exists (self ):
@@ -230,61 +277,14 @@ def test_create_subscription_return_annotation(self):
230277 ), f"Method create_subscription should have return type annotation"
231278
232279
233- def test_get_subscriptions_exists (self ):
234- """Test that get_subscriptions method exists with correct signature."""
235- # Check method exists
236- method = getattr (AccountActivityClient , "get_subscriptions" , None )
237- assert (
238- method is not None
239- ), f"Method get_subscriptions does not exist on AccountActivityClient"
240- # Check method is callable
241- assert callable (method ), f"get_subscriptions is not callable"
242- # Check method signature
243- sig = inspect .signature (method )
244- params = list (sig .parameters .keys ())
245- # Should have 'self' as first parameter
246- assert (
247- len (params ) >= 1
248- ), f"get_subscriptions should have at least 'self' parameter"
249- assert (
250- params [0 ] == "self"
251- ), f"First parameter should be 'self', got '{ params [0 ]} '"
252- # Check required parameters exist (excluding 'self')
253- required_params = [
254- "webhook_id" ,
255- ]
256- for required_param in required_params :
257- assert (
258- required_param in params
259- ), f"Required parameter '{ required_param } ' missing from get_subscriptions"
260- # Check optional parameters have defaults (excluding 'self')
261- optional_params = []
262- for optional_param in optional_params :
263- if optional_param in params :
264- param_obj = sig .parameters [optional_param ]
265- assert (
266- param_obj .default is not inspect .Parameter .empty
267- ), f"Optional parameter '{ optional_param } ' should have a default value"
268-
269-
270- def test_get_subscriptions_return_annotation (self ):
271- """Test that get_subscriptions has proper return type annotation."""
272- method = getattr (AccountActivityClient , "get_subscriptions" )
273- sig = inspect .signature (method )
274- # Check return annotation exists
275- assert (
276- sig .return_annotation is not inspect .Signature .empty
277- ), f"Method get_subscriptions should have return type annotation"
278-
279-
280280 def test_all_expected_methods_exist (self ):
281281 """Test that all expected methods exist on the client."""
282282 expected_methods = [
283- "get_subscription_count" ,
284283 "delete_subscription" ,
284+ "get_subscription_count" ,
285+ "get_subscriptions" ,
285286 "validate_subscription" ,
286287 "create_subscription" ,
287- "get_subscriptions" ,
288288 ]
289289 for expected_method in expected_methods :
290290 assert hasattr (
0 commit comments