| 1283 | |
| 1284 | def test_with_segments(self): |
| 1285 | class P(self.cls): |
| 1286 | def __init__(self, *pathsegments, session_id): |
| 1287 | super().__init__(*pathsegments) |
| 1288 | self.session_id = session_id |
| 1289 | |
| 1290 | def with_segments(self, *pathsegments): |
| 1291 | return type(self)(*pathsegments, session_id=self.session_id) |
| 1292 | p = P(self.base, session_id=42) |
| 1293 | self.assertEqual(42, p.absolute().session_id) |
| 1294 | self.assertEqual(42, p.resolve().session_id) |
no outgoing calls