@@ -28,6 +28,55 @@ def setup_class(self):
2828 self .account_activity_client = getattr (self .client , "account_activity" )
2929
3030
31+ def test_create_replay_job_exists (self ):
32+ """Test that create_replay_job method exists with correct signature."""
33+ # Check method exists
34+ method = getattr (AccountActivityClient , "create_replay_job" , None )
35+ assert (
36+ method is not None
37+ ), f"Method create_replay_job does not exist on AccountActivityClient"
38+ # Check method is callable
39+ assert callable (method ), f"create_replay_job is not callable"
40+ # Check method signature
41+ sig = inspect .signature (method )
42+ params = list (sig .parameters .keys ())
43+ # Should have 'self' as first parameter
44+ assert (
45+ len (params ) >= 1
46+ ), f"create_replay_job should have at least 'self' parameter"
47+ assert (
48+ params [0 ] == "self"
49+ ), f"First parameter should be 'self', got '{ params [0 ]} '"
50+ # Check required parameters exist (excluding 'self')
51+ required_params = [
52+ "webhook_id" ,
53+ "from_date" ,
54+ "to_date" ,
55+ ]
56+ for required_param in required_params :
57+ assert (
58+ required_param in params
59+ ), f"Required parameter '{ required_param } ' missing from create_replay_job"
60+ # Check optional parameters have defaults (excluding 'self')
61+ optional_params = []
62+ for optional_param in optional_params :
63+ if optional_param in params :
64+ param_obj = sig .parameters [optional_param ]
65+ assert (
66+ param_obj .default is not inspect .Parameter .empty
67+ ), f"Optional parameter '{ optional_param } ' should have a default value"
68+
69+
70+ def test_create_replay_job_return_annotation (self ):
71+ """Test that create_replay_job has proper return type annotation."""
72+ method = getattr (AccountActivityClient , "create_replay_job" )
73+ sig = inspect .signature (method )
74+ # Check return annotation exists
75+ assert (
76+ sig .return_annotation is not inspect .Signature .empty
77+ ), f"Method create_replay_job should have return type annotation"
78+
79+
3180 def test_validate_subscription_exists (self ):
3281 """Test that validate_subscription method exists with correct signature."""
3382 # Check method exists
@@ -169,35 +218,31 @@ def test_get_subscriptions_return_annotation(self):
169218 ), f"Method get_subscriptions should have return type annotation"
170219
171220
172- def test_create_replay_job_exists (self ):
173- """Test that create_replay_job method exists with correct signature."""
221+ def test_get_subscription_count_exists (self ):
222+ """Test that get_subscription_count method exists with correct signature."""
174223 # Check method exists
175- method = getattr (AccountActivityClient , "create_replay_job " , None )
224+ method = getattr (AccountActivityClient , "get_subscription_count " , None )
176225 assert (
177226 method is not None
178- ), f"Method create_replay_job does not exist on AccountActivityClient"
227+ ), f"Method get_subscription_count does not exist on AccountActivityClient"
179228 # Check method is callable
180- assert callable (method ), f"create_replay_job is not callable"
229+ assert callable (method ), f"get_subscription_count is not callable"
181230 # Check method signature
182231 sig = inspect .signature (method )
183232 params = list (sig .parameters .keys ())
184233 # Should have 'self' as first parameter
185234 assert (
186235 len (params ) >= 1
187- ), f"create_replay_job should have at least 'self' parameter"
236+ ), f"get_subscription_count should have at least 'self' parameter"
188237 assert (
189238 params [0 ] == "self"
190239 ), f"First parameter should be 'self', got '{ params [0 ]} '"
191240 # Check required parameters exist (excluding 'self')
192- required_params = [
193- "webhook_id" ,
194- "from_date" ,
195- "to_date" ,
196- ]
241+ required_params = []
197242 for required_param in required_params :
198243 assert (
199244 required_param in params
200- ), f"Required parameter '{ required_param } ' missing from create_replay_job "
245+ ), f"Required parameter '{ required_param } ' missing from get_subscription_count "
201246 # Check optional parameters have defaults (excluding 'self')
202247 optional_params = []
203248 for optional_param in optional_params :
@@ -208,14 +253,14 @@ def test_create_replay_job_exists(self):
208253 ), f"Optional parameter '{ optional_param } ' should have a default value"
209254
210255
211- def test_create_replay_job_return_annotation (self ):
212- """Test that create_replay_job has proper return type annotation."""
213- method = getattr (AccountActivityClient , "create_replay_job " )
256+ def test_get_subscription_count_return_annotation (self ):
257+ """Test that get_subscription_count has proper return type annotation."""
258+ method = getattr (AccountActivityClient , "get_subscription_count " )
214259 sig = inspect .signature (method )
215260 # Check return annotation exists
216261 assert (
217262 sig .return_annotation is not inspect .Signature .empty
218- ), f"Method create_replay_job should have return type annotation"
263+ ), f"Method get_subscription_count should have return type annotation"
219264
220265
221266 def test_delete_subscription_exists (self ):
@@ -266,60 +311,15 @@ def test_delete_subscription_return_annotation(self):
266311 ), f"Method delete_subscription should have return type annotation"
267312
268313
269- def test_get_subscription_count_exists (self ):
270- """Test that get_subscription_count method exists with correct signature."""
271- # Check method exists
272- method = getattr (AccountActivityClient , "get_subscription_count" , None )
273- assert (
274- method is not None
275- ), f"Method get_subscription_count does not exist on AccountActivityClient"
276- # Check method is callable
277- assert callable (method ), f"get_subscription_count is not callable"
278- # Check method signature
279- sig = inspect .signature (method )
280- params = list (sig .parameters .keys ())
281- # Should have 'self' as first parameter
282- assert (
283- len (params ) >= 1
284- ), f"get_subscription_count should have at least 'self' parameter"
285- assert (
286- params [0 ] == "self"
287- ), f"First parameter should be 'self', got '{ params [0 ]} '"
288- # Check required parameters exist (excluding 'self')
289- required_params = []
290- for required_param in required_params :
291- assert (
292- required_param in params
293- ), f"Required parameter '{ required_param } ' missing from get_subscription_count"
294- # Check optional parameters have defaults (excluding 'self')
295- optional_params = []
296- for optional_param in optional_params :
297- if optional_param in params :
298- param_obj = sig .parameters [optional_param ]
299- assert (
300- param_obj .default is not inspect .Parameter .empty
301- ), f"Optional parameter '{ optional_param } ' should have a default value"
302-
303-
304- def test_get_subscription_count_return_annotation (self ):
305- """Test that get_subscription_count has proper return type annotation."""
306- method = getattr (AccountActivityClient , "get_subscription_count" )
307- sig = inspect .signature (method )
308- # Check return annotation exists
309- assert (
310- sig .return_annotation is not inspect .Signature .empty
311- ), f"Method get_subscription_count should have return type annotation"
312-
313-
314314 def test_all_expected_methods_exist (self ):
315315 """Test that all expected methods exist on the client."""
316316 expected_methods = [
317+ "create_replay_job" ,
317318 "validate_subscription" ,
318319 "create_subscription" ,
319320 "get_subscriptions" ,
320- "create_replay_job" ,
321- "delete_subscription" ,
322321 "get_subscription_count" ,
322+ "delete_subscription" ,
323323 ]
324324 for expected_method in expected_methods :
325325 assert hasattr (
0 commit comments