def test_altsvc_frame_serialize_origin_without_port(self): f = AltSvcFrame(0) f.origin = Origin(scheme=b'https', host=b'yahoo.com', port=None) assert f.serialize_origin() == b'https://yahoo.com'