def test_trace_unpatch(self): # the application must not be traced if unpatch() is called unpatch() response = self.fetch('/custom_handler/') assert 400 == response.code traces = self.tracer.writer.pop_traces() assert 0 == len(traces)
def test_trace_unpatch(self): # the application must not be traced if unpatch() is called unpatch() response = self.fetch('/custom_handler/') eq_(400, response.code) traces = self.tracer.writer.pop_traces() eq_(0, len(traces))
def test_trace_unpatch_not_traced(self): # the untrace must be safe if the app is not traced unpatch() unpatch() response = self.fetch('/success/') eq_(200, response.code) traces = self.tracer.writer.pop_traces() eq_(0, len(traces))
def test_trace_unpatch(self): # the application must not be traced if unpatch() is called patch() unpatch() response = self.fetch('/success/') eq_(200, response.code) traces = self.tracer.writer.pop_traces() eq_(0, len(traces))
def test_trace_unpatch_not_traced(self): # the untrace must be safe if the app is not traced unpatch() unpatch() response = self.fetch('/success/') assert 200 == response.code traces = self.tracer.writer.pop_traces() assert 0 == len(traces)
def test_trace_unpatch(self): # the application must not be traced if unpatch() is called patch() unpatch() response = self.fetch('/success/') assert 200 == response.code traces = self.tracer.writer.pop_traces() assert 0 == len(traces)
def tearDown(self): super(TornadoTestCase, self).tearDown() # unpatch Tornado unpatch() compat.reload_module(compat) compat.reload_module(app)