| 1292 | |
| 1293 | def test_with_segments(self): |
| 1294 | class P(self.cls): |
| 1295 | def __init__(self, *pathsegments, session_id): |
| 1296 | super().__init__(*pathsegments) |
| 1297 | self.session_id = session_id |
| 1298 | |
| 1299 | def with_segments(self, *pathsegments): |
| 1300 | return type(self)(*pathsegments, session_id=self.session_id) |
| 1301 | p = P(self.base, session_id=42) |
| 1302 | self.assertEqual(42, p.absolute().session_id) |
| 1303 | self.assertEqual(42, p.resolve().session_id) |
no outgoing calls