Exemplo n.º 1
0
 def testA(self):
     """Note that all test method names must begin with 'test.'"""
     con = Connection("127.0.0.1", 10000)
     con.open()
     con.send("Can you hear me?")
     con.close()
     con.open()
     con.send("Can you hear me now?")
     con.close()
     assert 5 == 5, "bar() not calculating values correctly"
Exemplo n.º 2
0
 def testCloseRaisesNetworkExceptionOnAlreadyClosedConnection(self):
     con = Connection(self.config["server"]["ip"],
                      self.config["server"]["port"])
     with self.assertRaises(NetworkException):
         con.close()