def test_decr_with_tag(self): with pytest.raises(ValueError): statsdecor.decr('a.metric', tags=self.tags)
def test_decr_with_tag(self, mocked_super): statsdecor.decr('a.metric', tags=self.tags) mocked_super.assert_called_with(metric='a.metric', value=DEFAULT_VALUE, tags=self.tags, sample_rate=DEFAULT_RATE)
def test_decr_no_tag(self, mocked_super): statsdecor.decr('a.metric') mocked_super.assert_called_with(stat='a.metric', count=DEFAULT_VALUE, rate=DEFAULT_RATE)
def test_decr__with_value_and_rate(): with stub_client() as stub: statsdecor.decr('a.metric', 9, 0.1) stub.client.decr.assert_called_with('a.metric', 9, 0.1)
def test_decr(): with stub_client() as stub: statsdecor.decr('a.metric') stub.client.decr.assert_called_with('a.metric', 1, 1)