Created
November 17, 2010 10:48
-
-
Save paolo-losi/703251 to your computer and use it in GitHub Desktop.
tornado async test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestConnectionHandshake(testing.AsyncTestCase): | |
def test_handshake(self): | |
conn = Connection('localhost', io_loop=self.io_loop) | |
def on_connect(): | |
self.assertEquals(conn.status, status.CONNECTED) | |
conn.close(self.stop) | |
conn.connect(on_connect) | |
self.wait() | |
if __name__ == '__main__': | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment