#2248 - Final run over all the docstrings after running pre-commit. All tests now working. Updated CHANGELOG.md.

This commit is contained in:
Chris McCarthy
2024-02-08 10:53:30 +00:00
parent 0c96fef3ec
commit 411f0a320f
41 changed files with 582 additions and 328 deletions

View File

@@ -16,21 +16,13 @@ from primaite.simulator.system.services.database.database_service import Databas
def database_client_on_computer() -> Tuple[DatabaseClient, Computer]:
network = Network()
db_server = Server(
hostname="db_server",
ip_address="192.168.0.1",
subnet_mask="255.255.255.0",
start_up_duration=0
)
db_server = Server(hostname="db_server", ip_address="192.168.0.1", subnet_mask="255.255.255.0", start_up_duration=0)
db_server.power_on()
db_server.software_manager.install(DatabaseService)
db_server.software_manager.software["DatabaseService"].start()
db_client = Computer(
hostname="db_client",
ip_address="192.168.0.2",
subnet_mask="255.255.255.0",
start_up_duration=0
hostname="db_client", ip_address="192.168.0.2", subnet_mask="255.255.255.0", start_up_duration=0
)
db_client.power_on()
db_client.software_manager.install(DatabaseClient)
@@ -97,6 +89,7 @@ def test_disconnect(database_client_on_computer):
assert not database_client.connected
def test_query_when_client_is_closed(database_client_on_computer):
"""Database client should return False when it is not running."""
database_client, computer = database_client_on_computer

View File

@@ -16,7 +16,7 @@ def web_browser() -> WebBrowser:
ip_address="192.168.1.11",
subnet_mask="255.255.255.0",
default_gateway="192.168.1.1",
start_up_duration=0
start_up_duration=0,
)
computer.power_on()
# Web Browser should be pre-installed in computer

View File

@@ -9,8 +9,8 @@ from primaite.simulator.network.hardware.nodes.host.computer import Computer
from primaite.simulator.network.hardware.nodes.host.server import Server
from primaite.simulator.network.transmission.network_layer import IPProtocol
from primaite.simulator.network.transmission.transport_layer import Port
from primaite.simulator.system.services.dns.dns_server import DNSServer
from primaite.simulator.system.services.dns.dns_client import DNSClient
from primaite.simulator.system.services.dns.dns_server import DNSServer
@pytest.fixture(scope="function")
@@ -65,6 +65,4 @@ def test_dns_server_receive(dns_server):
assert dns_client.check_domain_exists("real-domain.com") is False
dns_server_service.show()