1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00
Files
Stefan Pratter 398ff357b1 Support 202311 (#1506)
Add a "flag bad data" button on various places #170
Add a "last synced at $date" to beta.peeringdb.com #410
Improve RIR Update Procedure #1303
Only indicate availability of DC voltage for facilities #1341
Clarifying the Network Type field #1357
Changing ASN field on "Add Network" to be numbers only #1430
Update website to take advantage of wider screen and improve mobile device support #1463
v2 search - not able to find IX participant based on IP #1469
v2 search not able to find organization and network - Marconi Solutions Srls #1476
Improve RIR Update Procedure #1280

Co-authored-by: 20C <code@20c.com>
2024-01-15 14:12:00 -06:00

21 lines
576 B
Python

import pytest
from peeringdb_server.models import Network
def test_network_legacy_info_type():
network = Network(
asn=1, name="Test Network", irr_as_set="AS-TEST", info_types=["Content", "NSP"]
)
# legacy field mapped to info_type (first element)
assert network.info_type == "Content"
assert network.info_types == ["Content", "NSP"]
# trying to instantiate a model with `info_type` should
# raise an error
with pytest.raises(AttributeError):
Network(asn=1, name="Test Network", irr_as_set="AS-TEST", info_type="Content")