From 550b62f75dc7b5bf29d43808feaf2b62687f0010 Mon Sep 17 00:00:00 2001 From: SunilSamra Date: Mon, 21 Aug 2023 16:09:17 +0100 Subject: [PATCH] #1752 - Removed unnecessary print statement - Changed docstring on function check_domain_in_cache --- src/primaite/simulator/system/services/dns_client.py | 8 ++++++-- tests/test_seeding_and_deterministic_session.py | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/primaite/simulator/system/services/dns_client.py b/src/primaite/simulator/system/services/dns_client.py index ce4a9150..f99411d2 100644 --- a/src/primaite/simulator/system/services/dns_client.py +++ b/src/primaite/simulator/system/services/dns_client.py @@ -43,8 +43,12 @@ class DNSClient(BaseModel): """ self.dns_cache = {} - def check_domain_is_in_cache(self, target_domain: str, session_id: str): - """Function to check if domain name is in DNS client cache.""" + def check_domain_in_cache(self, target_domain: str, session_id: str): + """Function to check if domain name is in DNS client cache. + + :param target_domain: The domain requested for an IP address. + :param session_id: The ID of the session in order to send the response to the DNS server or application. + """ if target_domain in self.dns_cache: ip_address = self.dns_cache[target_domain] self.send(ip_address, session_id) diff --git a/tests/test_seeding_and_deterministic_session.py b/tests/test_seeding_and_deterministic_session.py index 9500c4a3..aff5496a 100644 --- a/tests/test_seeding_and_deterministic_session.py +++ b/tests/test_seeding_and_deterministic_session.py @@ -45,7 +45,6 @@ def test_seeded_learning(temp_primaite_session): ), "Expected output is based upon a agent that was trained with seed 67890" session.learn() actual_mean_reward_per_episode = session.learn_av_reward_per_episode_dict() - print(actual_mean_reward_per_episode, "THISt") assert actual_mean_reward_per_episode == expected_mean_reward_per_episode