Files
PrimAITE/tests/integration_tests/network/test_nic_link_connection.py
Chris McCarthy 05959e5408 #1800 - Moved the Switch code to a dedicated switch.py module.
- Added more switch tests.
- Updated ACL tests to use router acl.
- Updated more docs.
- Moved the Jupyter notebooks to _package_data and fixed up the setup to move all notebooks to ~/primaite/notebooks/example_notebooks.
2023-09-04 12:14:24 +01:00

11 lines
362 B
Python

import pytest
from primaite.simulator.network.hardware.base import Link, NIC
def test_link_fails_with_same_nic():
"""Tests Link creation fails with endpoint_a and endpoint_b are the same NIC."""
with pytest.raises(ValueError):
nic_a = NIC(ip_address="192.168.1.2", subnet_mask="255.255.255.0")
Link(endpoint_a=nic_a, endpoint_b=nic_a)