示例#1
0
 def test_repr(self):
     sc = tutils.tserver_conn()
     assert "address:22" in repr(sc)
     assert "ssl" not in repr(sc)
     sc.ssl_established = True
     assert "ssl" in repr(sc)
     sc.sni = "foo"
     assert "foo" in repr(sc)
示例#2
0
 def test_dst(self):
     q = self.req()
     q.server_conn = tutils.tserver_conn()
     assert self.q("~dst address", q)
     assert not self.q("~dst foobar", q)
     assert self.q("~dst :22", q)
     assert not self.q("~dst :99", q)
     assert self.q("~dst address:22", q)
示例#3
0
 def test_dst(self):
     q = self.req()
     q.server_conn = tutils.tserver_conn()
     assert self.q("~dst address", q)
     assert not self.q("~dst foobar", q)
     assert self.q("~dst :22", q)
     assert not self.q("~dst :99", q)
     assert self.q("~dst address:22", q)
示例#4
0
 def test_repr(self):
     sc = tutils.tserver_conn()
     assert "address:22" in repr(sc)
     assert "ssl" not in repr(sc)
     sc.ssl_established = True
     assert "ssl" in repr(sc)
     sc.sni = "foo"
     assert "foo" in repr(sc)