#2248 - Final run over all the docstrings after running pre-commit. All tests now working. Updated CHANGELOG.md.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user