def main(): strategy = DistanceStrategy(GLOBAL_CIRCLE_DISTANCE) file_path = os.path.abspath(FILE_NAME) service = InviteService(distance_estimator=strategy) data = Parser.parsing(file_path=file_path, decoder=CustomerDecoder) result = service.calculate(data) FormatterOutput.output(result)
def invitees(): strategy = DistanceStrategy(GLOBAL_CIRCLE_DISTANCE) service = InviteService(distance_estimator=strategy) file_path = './test_customer.json' parser = Parser() data = parser.parsing(file_path=file_path, decoder=CustomerDecoder) result = service.calculate(data) yield result
def customers(): file_path = './test_customer.json' parser = Parser() data = parser.parsing(file_path=file_path, decoder=CustomerDecoder) yield data
def test_parsed_missing_file(): with pytest.raises(Exception): file_path = '../missing_file' parser = Parser() data = parser.parsing(file_path=file_path, decoder=CustomerDecoder)