File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,19 @@ def test_lambda_metric_timestamp_with_extension(self):
58
58
"test_timestamp" , 1 , timestamp = timestamp , tags = [dd_lambda_layer_tag ]
59
59
)
60
60
61
+ @patch ("datadog_lambda.metric.should_use_extension" , True )
62
+ def test_lambda_metric_datetime_with_extension (self ):
63
+ patcher = patch ("datadog_lambda.metric.extension_thread_stats" )
64
+ self .mock_metric_extension_thread_stats = patcher .start ()
65
+ self .addCleanup (patcher .stop )
66
+
67
+ delta = timedelta (hours = 5 )
68
+ timestamp = datetime .now () - delta
69
+
70
+ lambda_metric ("test_timestamp" , 1 , timestamp )
71
+ self .mock_metric_lambda_stats .distribution .assert_not_called ()
72
+ self .mock_metric_extension_thread_stats .distribution .assert_not_called ()
73
+
61
74
@patch ("datadog_lambda.metric.should_use_extension" , True )
62
75
def test_lambda_metric_invalid_timestamp_with_extension (self ):
63
76
patcher = patch ("datadog_lambda.metric.extension_thread_stats" )
You can’t perform that action at this time.
0 commit comments