client.fetch(self.get_url('/user_agent'), callback=self.stop)
response = self.wait()
self.assertEqual(response.body, b'TestDefaultUserAgent')
+ client.close()
def test_304_with_content_length(self):
# According to the spec 304 responses SHOULD NOT include
except Exception:
self.__failure = sys.exc_info()
self.stop()
- if self.__timeout is not None:
- self.io_loop.remove_timeout(self.__timeout)
self.__timeout = self.io_loop.add_timeout(self.io_loop.time() + timeout, timeout_func)
while True:
self.__running = True
if (self.__failure is not None or
condition is None or condition()):
break
+ if self.__timeout is not None:
+ self.io_loop.remove_timeout(self.__timeout)
+ self.__timeout = None
assert self.__stopped
self.__stopped = False
self.__rethrow()