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)
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)