PLEASE WRITE A PYTEST BASED OFF THE FOLLOWING CODE. PLEASE DO NOT COPY ANYTHING THATS ON CHEGG class PhoneCall(AbstractPhoneCall): time_format = "%H:%M" # 24-hour format def __init__(self, caller, callee, start, end): self.caller = caller self.callee = callee self.start_str = start self.end_str = end self.parse_times(start, end) def parse_times(self, given_start, given_end): start = datetime.strptime(given_start, self.time_format) end = datetime.strptime(given_end, self.time_format) self.start = start.time() self.end = end.time() def get_caller(self) -> str: return self.caller def get_callee(self) -> str: return self.callee def get_starttime(self) -> time: return self.start def get_starttime_string(self) -> str: return self.start_str def get_endtime(self) -> time: return self.end def get_endtime_string(self) -> str: return self.end_str
PLEASE WRITE A PYTEST BASED OFF THE FOLLOWING CODE. PLEASE DO NOT COPY ANYTHING THATS ON CHEGG class PhoneCall(AbstractPhoneCall): time_format = "%H:%M" # 24-hour format def __init__(self, caller, callee, start, end): self.caller = caller self.callee = callee self.start_str = start self.end_str = end self.parse_times(start, end) def parse_times(self, given_start, given_end): start = datetime.strptime(given_start, self.time_format) end = datetime.strptime(given_end, self.time_format) self.start = start.time() self.end = end.time() def get_caller(self) -> str: return self.caller def get_callee(self) -> str: return self.callee def get_starttime(self) -> time: return self.start def get_starttime_string(self) -> str: return self.start_str def get_endtime(self) -> time: return self.end def get_endtime_string(self) -> str: return self.end_str
Step by step
Solved in 2 steps with 1 images