()
| 350 | |
| 351 | |
| 352 | def test_ipvany_serialization(): |
| 353 | class Model(BaseModel): |
| 354 | address: IPvAnyAddress |
| 355 | network: IPvAnyNetwork |
| 356 | interface: IPvAnyInterface |
| 357 | |
| 358 | m = Model(address='127.0.0.1', network='192.0.2.0/27', interface='127.0.0.1/32') |
| 359 | assert json.loads(m.model_dump_json()) == { |
| 360 | 'address': '127.0.0.1', |
| 361 | 'interface': '127.0.0.1/32', |
| 362 | 'network': '192.0.2.0/27', |
| 363 | } |
| 364 | |
| 365 | |
| 366 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected