-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathtest_client.py
More file actions
25 lines (18 loc) · 756 Bytes
/
test_client.py
File metadata and controls
25 lines (18 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import statsd
from unittest import TestCase
class TestClient(TestCase):
def test_average_shortcut(self):
average = statsd.Client('average').get_average()
assert isinstance(average, statsd.Average)
def test_counter_shortcut(self):
counter = statsd.Client('counter').get_counter()
assert isinstance(counter, statsd.Counter)
def test_gauge_shortcut(self):
gauge = statsd.Client('gauge').get_gauge()
assert isinstance(gauge, statsd.Gauge)
def test_raw_shortcut(self):
raw = statsd.Client('raw').get_raw()
assert isinstance(raw, statsd.Raw)
def test_timer_shortcut(self):
timer = statsd.Client('timer').get_timer()
assert isinstance(timer, statsd.Timer)