@@ -14,19 +14,31 @@ def setUp(self):
14
14
def test_incr (self , mock_incr ):
15
15
self .backend .incr ("foo" , instance = "bar" )
16
16
mock_incr .assert_called_once_with (
17
- "sentrytest.foo" , 1 , sample_rate = 1 , tags = ["instance:bar" ], host = get_hostname ()
17
+ "sentrytest.foo" ,
18
+ 1 ,
19
+ sample_rate = 1 ,
20
+ tags = ["instance:bar" ],
21
+ host = get_hostname (hostname_from_config = True ),
18
22
)
19
23
20
24
@patch ("datadog.threadstats.base.ThreadStats.timing" )
21
25
def test_timing (self , mock_timing ):
22
26
self .backend .timing ("foo" , 30 , instance = "bar" )
23
27
mock_timing .assert_called_once_with (
24
- "sentrytest.foo" , 30 , sample_rate = 1 , tags = ["instance:bar" ], host = get_hostname ()
28
+ "sentrytest.foo" ,
29
+ 30 ,
30
+ sample_rate = 1 ,
31
+ tags = ["instance:bar" ],
32
+ host = get_hostname (hostname_from_config = True ),
25
33
)
26
34
27
35
@patch ("datadog.threadstats.base.ThreadStats.gauge" )
28
36
def test_gauge (self , mock_gauge ):
29
37
self .backend .gauge ("foo" , 5 , instance = "bar" )
30
38
mock_gauge .assert_called_once_with (
31
- "sentrytest.foo" , 5 , sample_rate = 1 , tags = ["instance:bar" ], host = get_hostname ()
39
+ "sentrytest.foo" ,
40
+ 5 ,
41
+ sample_rate = 1 ,
42
+ tags = ["instance:bar" ],
43
+ host = get_hostname (hostname_from_config = True ),
32
44
)
0 commit comments