@@ -43,35 +43,31 @@ def setup_class(self):
4343 self .account_activity_client = getattr (self .client , "account_activity" )
4444
4545
46- def test_create_replay_job_exists (self ):
47- """Test that create_replay_job method exists with correct signature."""
46+ def test_get_subscription_count_exists (self ):
47+ """Test that get_subscription_count method exists with correct signature."""
4848 # Check method exists
49- method = getattr (AccountActivityClient , "create_replay_job " , None )
49+ method = getattr (AccountActivityClient , "get_subscription_count " , None )
5050 assert (
5151 method is not None
52- ), f"Method create_replay_job does not exist on AccountActivityClient"
52+ ), f"Method get_subscription_count does not exist on AccountActivityClient"
5353 # Check method is callable
54- assert callable (method ), f"create_replay_job is not callable"
54+ assert callable (method ), f"get_subscription_count is not callable"
5555 # Check method signature
5656 sig = inspect .signature (method )
5757 params = list (sig .parameters .keys ())
5858 # Should have 'self' as first parameter
5959 assert (
6060 len (params ) >= 1
61- ), f"create_replay_job should have at least 'self' parameter"
61+ ), f"get_subscription_count should have at least 'self' parameter"
6262 assert (
6363 params [0 ] == "self"
6464 ), f"First parameter should be 'self', got '{ params [0 ]} '"
6565 # Check required parameters exist (excluding 'self')
66- required_params = [
67- "webhook_id" ,
68- "from_date" ,
69- "to_date" ,
70- ]
66+ required_params = []
7167 for required_param in required_params :
7268 assert (
7369 required_param in params
74- ), f"Required parameter '{ required_param } ' missing from create_replay_job "
70+ ), f"Required parameter '{ required_param } ' missing from get_subscription_count "
7571 # Check optional parameters have defaults (excluding 'self')
7672 optional_params = []
7773 for optional_param in optional_params :
@@ -82,43 +78,44 @@ def test_create_replay_job_exists(self):
8278 ), f"Optional parameter '{ optional_param } ' should have a default value"
8379
8480
85- def test_create_replay_job_return_annotation (self ):
86- """Test that create_replay_job has proper return type annotation."""
87- method = getattr (AccountActivityClient , "create_replay_job " )
81+ def test_get_subscription_count_return_annotation (self ):
82+ """Test that get_subscription_count has proper return type annotation."""
83+ method = getattr (AccountActivityClient , "get_subscription_count " )
8884 sig = inspect .signature (method )
8985 # Check return annotation exists
9086 assert (
9187 sig .return_annotation is not inspect .Signature .empty
92- ), f"Method create_replay_job should have return type annotation"
88+ ), f"Method get_subscription_count should have return type annotation"
9389
9490
95- def test_get_subscriptions_exists (self ):
96- """Test that get_subscriptions method exists with correct signature."""
91+ def test_delete_subscription_exists (self ):
92+ """Test that delete_subscription method exists with correct signature."""
9793 # Check method exists
98- method = getattr (AccountActivityClient , "get_subscriptions " , None )
94+ method = getattr (AccountActivityClient , "delete_subscription " , None )
9995 assert (
10096 method is not None
101- ), f"Method get_subscriptions does not exist on AccountActivityClient"
97+ ), f"Method delete_subscription does not exist on AccountActivityClient"
10298 # Check method is callable
103- assert callable (method ), f"get_subscriptions is not callable"
99+ assert callable (method ), f"delete_subscription is not callable"
104100 # Check method signature
105101 sig = inspect .signature (method )
106102 params = list (sig .parameters .keys ())
107103 # Should have 'self' as first parameter
108104 assert (
109105 len (params ) >= 1
110- ), f"get_subscriptions should have at least 'self' parameter"
106+ ), f"delete_subscription should have at least 'self' parameter"
111107 assert (
112108 params [0 ] == "self"
113109 ), f"First parameter should be 'self', got '{ params [0 ]} '"
114110 # Check required parameters exist (excluding 'self')
115111 required_params = [
116112 "webhook_id" ,
113+ "user_id" ,
117114 ]
118115 for required_param in required_params :
119116 assert (
120117 required_param in params
121- ), f"Required parameter '{ required_param } ' missing from get_subscriptions "
118+ ), f"Required parameter '{ required_param } ' missing from delete_subscription "
122119 # Check optional parameters have defaults (excluding 'self')
123120 optional_params = []
124121 for optional_param in optional_params :
@@ -129,14 +126,14 @@ def test_get_subscriptions_exists(self):
129126 ), f"Optional parameter '{ optional_param } ' should have a default value"
130127
131128
132- def test_get_subscriptions_return_annotation (self ):
133- """Test that get_subscriptions has proper return type annotation."""
134- method = getattr (AccountActivityClient , "get_subscriptions " )
129+ def test_delete_subscription_return_annotation (self ):
130+ """Test that delete_subscription has proper return type annotation."""
131+ method = getattr (AccountActivityClient , "delete_subscription " )
135132 sig = inspect .signature (method )
136133 # Check return annotation exists
137134 assert (
138135 sig .return_annotation is not inspect .Signature .empty
139- ), f"Method get_subscriptions should have return type annotation"
136+ ), f"Method delete_subscription should have return type annotation"
140137
141138
142139 def test_validate_subscription_exists (self ):
@@ -233,79 +230,33 @@ def test_create_subscription_return_annotation(self):
233230 ), f"Method create_subscription should have return type annotation"
234231
235232
236- def test_delete_subscription_exists (self ):
237- """Test that delete_subscription method exists with correct signature."""
233+ def test_get_subscriptions_exists (self ):
234+ """Test that get_subscriptions method exists with correct signature."""
238235 # Check method exists
239- method = getattr (AccountActivityClient , "delete_subscription " , None )
236+ method = getattr (AccountActivityClient , "get_subscriptions " , None )
240237 assert (
241238 method is not None
242- ), f"Method delete_subscription does not exist on AccountActivityClient"
239+ ), f"Method get_subscriptions does not exist on AccountActivityClient"
243240 # Check method is callable
244- assert callable (method ), f"delete_subscription is not callable"
241+ assert callable (method ), f"get_subscriptions is not callable"
245242 # Check method signature
246243 sig = inspect .signature (method )
247244 params = list (sig .parameters .keys ())
248245 # Should have 'self' as first parameter
249246 assert (
250247 len (params ) >= 1
251- ), f"delete_subscription should have at least 'self' parameter"
248+ ), f"get_subscriptions should have at least 'self' parameter"
252249 assert (
253250 params [0 ] == "self"
254251 ), f"First parameter should be 'self', got '{ params [0 ]} '"
255252 # Check required parameters exist (excluding 'self')
256253 required_params = [
257254 "webhook_id" ,
258- "user_id" ,
259255 ]
260256 for required_param in required_params :
261257 assert (
262258 required_param in params
263- ), f"Required parameter '{ required_param } ' missing from delete_subscription"
264- # Check optional parameters have defaults (excluding 'self')
265- optional_params = []
266- for optional_param in optional_params :
267- if optional_param in params :
268- param_obj = sig .parameters [optional_param ]
269- assert (
270- param_obj .default is not inspect .Parameter .empty
271- ), f"Optional parameter '{ optional_param } ' should have a default value"
272-
273-
274- def test_delete_subscription_return_annotation (self ):
275- """Test that delete_subscription has proper return type annotation."""
276- method = getattr (AccountActivityClient , "delete_subscription" )
277- sig = inspect .signature (method )
278- # Check return annotation exists
279- assert (
280- sig .return_annotation is not inspect .Signature .empty
281- ), f"Method delete_subscription should have return type annotation"
282-
283-
284- def test_get_subscription_count_exists (self ):
285- """Test that get_subscription_count method exists with correct signature."""
286- # Check method exists
287- method = getattr (AccountActivityClient , "get_subscription_count" , None )
288- assert (
289- method is not None
290- ), f"Method get_subscription_count does not exist on AccountActivityClient"
291- # Check method is callable
292- assert callable (method ), f"get_subscription_count is not callable"
293- # Check method signature
294- sig = inspect .signature (method )
295- params = list (sig .parameters .keys ())
296- # Should have 'self' as first parameter
297- assert (
298- len (params ) >= 1
299- ), f"get_subscription_count should have at least 'self' parameter"
300- assert (
301- params [0 ] == "self"
302- ), f"First parameter should be 'self', got '{ params [0 ]} '"
303- # Check required parameters exist (excluding 'self')
304- required_params = []
305- for required_param in required_params :
306- assert (
307- required_param in params
308- ), f"Required parameter '{ required_param } ' missing from get_subscription_count"
259+ ), f"Required parameter '{ required_param } ' missing from get_subscriptions"
309260 # Check optional parameters have defaults (excluding 'self')
310261 optional_params = []
311262 for optional_param in optional_params :
@@ -316,25 +267,24 @@ def test_get_subscription_count_exists(self):
316267 ), f"Optional parameter '{ optional_param } ' should have a default value"
317268
318269
319- def test_get_subscription_count_return_annotation (self ):
320- """Test that get_subscription_count has proper return type annotation."""
321- method = getattr (AccountActivityClient , "get_subscription_count " )
270+ def test_get_subscriptions_return_annotation (self ):
271+ """Test that get_subscriptions has proper return type annotation."""
272+ method = getattr (AccountActivityClient , "get_subscriptions " )
322273 sig = inspect .signature (method )
323274 # Check return annotation exists
324275 assert (
325276 sig .return_annotation is not inspect .Signature .empty
326- ), f"Method get_subscription_count should have return type annotation"
277+ ), f"Method get_subscriptions should have return type annotation"
327278
328279
329280 def test_all_expected_methods_exist (self ):
330281 """Test that all expected methods exist on the client."""
331282 expected_methods = [
332- "create_replay_job " ,
333- "get_subscriptions " ,
283+ "get_subscription_count " ,
284+ "delete_subscription " ,
334285 "validate_subscription" ,
335286 "create_subscription" ,
336- "delete_subscription" ,
337- "get_subscription_count" ,
287+ "get_subscriptions" ,
338288 ]
339289 for expected_method in expected_methods :
340290 assert hasattr (
0 commit comments