# Path: business_logic/models/log.py
# LOG_ENTRY_VALUE_LENGTH = settings.PROGRAM_LOG_ENTRY_VALUE_LENGTH


from business_logic.models.log import LOG_ENTRY_VALUE_LENGTH
from .common import *
        self.assertTrue(context.logger)
        self.assertTrue(context.logger.log is None)

    def test_log_tree(self):
        root = tree_1plus2mul3()

        context = Context(log=True)
        result = root.interpret(context)

        self.assertTrue(context.logger.log)
        self.assertTrue(isinstance(context.logger.log, LogEntry))
        self.assertEqual(context.logger.log.node, root)

    def test_log_values(self):
        root = tree_1plus2mul3()

        context = Context(log=True)
        result = root.interpret(context)

        self.assertTrue(context.logger.log)
        self.assertTrue(isinstance(context.logger.log, LogEntry))
        self.assertEqual(context.logger.log.node, root)
        self.assertEqual(context.logger.log.previous_value, '+')
        self.assertEqual(context.logger.log.current_value, '7.0')

    def test_log_current_long_values(self):
        add_operator = BinaryOperator(operator='+')
        add_operator.save()

        root = Node.add_root(content_object=add_operator)

# Path: business_logic/models/log.py
# LOG_ENTRY_VALUE_LENGTH = settings.PROGRAM_LOG_ENTRY_VALUE_LENGTH


# Path: tests/test_log.py
from business_logic.models.log import LOG_ENTRY_VALUE_LENGTH
from .common import *

        self.assertTrue(context.logger)
        self.assertTrue(context.logger.log is None)

    def test_log_tree(self):
        root = tree_1plus2mul3()

        context = Context(log=True)
        result = root.interpret(context)

        self.assertTrue(context.logger.log)
        self.assertTrue(isinstance(context.logger.log, LogEntry))
        self.assertEqual(context.logger.log.node, root)

    def test_log_values(self):
        root = tree_1plus2mul3()

        context = Context(log=True)
        result = root.interpret(context)

        self.assertTrue(context.logger.log)
        self.assertTrue(isinstance(context.logger.log, LogEntry))
        self.assertEqual(context.logger.log.node, root)
        self.assertEqual(context.logger.log.previous_value, '+')
        self.assertEqual(context.logger.log.current_value, '7.0')

    def test_log_current_long_values(self):
        add_operator = BinaryOperator(operator='+')
        add_operator.save()

        root = Node.add_root(content_object=add_operator)

        str1 = 'a' * (LOG_ENTRY_VALUE_LENGTH - 4)