from answer_presenter import AnswerPresenter def test_answer_presenter(): answer_presenter = AnswerPresenter() # Test presenting answer without aggregator answer = {"answer": "Test", "aggregator": "NONE"} presented_answer = answer_presenter.present(answer) assert presented_answer == "Test" # Test presenting answer with aggregator answer = {"answer": "SUM > 1, 2", "cells": ["1", "2"], "aggregator": "SUM"} presented_answer = answer_presenter.present(answer) assert presented_answer == "3"