class TestRaven(object): def setup(self): if RavenOutput is None: raise SkipTest self.client_proxy = RavenOutput( "http://*****:*****@localhost:9000/1") self.client = self.client_proxy.clients[0] def test_sentry(self): ctx = patch.object(self.client, 'send') with ctx: self.client_proxy.deliver({'fields': {'name': 'testing.statsd', 'type': 'gauge', 'rate': '8'}, 'payload': 'not_real_sentry_data'}) method = self.client.send eq_(len(method.call_args_list), 1) call_msg = method.call_args_list[0] eq_(call_msg[0], ('not_real_sentry_data',))
def setup(self): if RavenOutput is None: raise SkipTest self.client_proxy = RavenOutput( "http://*****:*****@localhost:9000/1") self.client = self.client_proxy.clients[0]