# coding: utf-8
from types import SimpleNamespace

from datetime import datetime, timedelta
from unittest.mock import patch

from dateutil.relativedelta import relativedelta
from jinja2 import Undefined, Markup
from mock import Mock

from app.jinja_filters import (
    format_date, format_conditional_date, format_currency, get_currency_symbol,
    format_multilined_string, format_percentage, format_date_range,
    format_household_member_name, format_datetime,
    format_number_to_alphabetic_letter, format_unit, format_currency_for_input,
    format_number, format_unordered_list, format_unit_input_label,
    format_household_member_name_possessive, concatenated_list,
    calculate_years_difference, get_current_date, as_london_tz, max_value,
    min_value, get_question_title, get_answer_label,
    format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom,
    format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list)
from tests.app.app_context_test_case import AppContextTestCase


class TestJinjaFilters(AppContextTestCase):  # pylint: disable=too-many-public-methods
    def setUp(self):
        self.autoescape_context = Mock(autoescape=True)
        super(TestJinjaFilters, self).setUp()

    @patch('app.jinja_filters.flask_babel.get_locale', Mock(return_value='en_GB'))
    def test_format_currency_for_input(self):
        self.assertEqual(format_currency_for_input('100', 2), '100.00')
        self.assertEqual(format_currency_for_input('100.0', 2), '100.00')
        self.assertEqual(format_currency_for_input('100.00', 2), '100.00')
        self.assertEqual(format_currency_for_input('1000'), '1,000')
        self.assertEqual(format_currency_for_input('10000'), '10,000')
        self.assertEqual(format_currency_for_input('100000000'), '100,000,000')
        self.assertEqual(format_currency_for_input('100000000', 2), '100,000,000.00')
        self.assertEqual(format_currency_for_input(0, 2), '0.00')
        self.assertEqual(format_currency_for_input(0), '0')
        self.assertEqual(format_currency_for_input(''), '')
        self.assertEqual(format_currency_for_input(None), '')
        self.assertEqual(format_currency_for_input(Undefined()), '')

    @patch('app.jinja_filters.flask_babel.get_locale', Mock(return_value='en_GB'))
    def test_get_currency_symbol(self):
        self.assertEqual(get_currency_symbol('GBP'), '£')
        self.assertEqual(get_currency_symbol('EUR'), '€')
        self.assertEqual(get_currency_symbol('USD'), 'US$')
        self.assertEqual(get_currency_symbol('JPY'), 'JP¥')
        self.assertEqual(get_currency_symbol(''), '')

    @patch('app.jinja_filters.flask_babel.get_locale', Mock(return_value='en_GB'))
    def test_format_currency(self):
        self.assertEqual(format_currency(self.autoescape_context, '11', 'GBP'), "<span class='date'>£11.00</span>")
        self.assertEqual(format_currency(self.autoescape_context, '11.99', 'GBP'), "<span class='date'>£11.99</span>")
        self.assertEqual(format_currency(self.autoescape_context, '11000', 'USD'), "<span class='date'>US$11,000.00</span>")
        self.assertEqual(format_currency(self.autoescape_context, 0), "<span class='date'>£0.00</span>")
        self.assertEqual(format_currency(self.autoescape_context, 0.00), "<span class='date'>£0.00</span>")
        self.assertEqual(format_currency(self.autoescape_context, '', ), "<span class='date'></span>")
        self.assertEqual(format_currency(self.autoescape_context, None), "<span class='date'></span>")
        self.assertEqual(format_currency(self.autoescape_context, Undefined()), "<span class='date'></span>")

    @patch('app.jinja_filters.flask_babel.get_locale', Mock(return_value='en_GB'))
    def test_format_number(self):
        self.assertEqual(format_number(123), '123')
        self.assertEqual(format_number('123.4'), '123.4')
        self.assertEqual(format_number('123.40'), '123.4')
        self.assertEqual(format_number('1000'), '1,000')
        self.assertEqual(format_number('10000'), '10,000')
        self.assertEqual(format_number('100000000'), '100,000,000')
        self.assertEqual(format_number(0), '0')
        self.assertEqual(format_number(0.00), '0')
        self.assertEqual(format_number(''), '')
        self.assertEqual(format_number(None), '')
        self.assertEqual(format_number(Undefined()), '')

    def test_format_multilined_string_matches_carriage_return(self):
        # Given
        new_line = 'this is on a new\rline'

        # When
        format_value = format_multilined_string(self.autoescape_context, new_line)

        self.assertEqual(format_value, 'this is on a new<br>line')

    def test_format_multilined_string_matches_new_line(self):
        # Given
        new_line = 'this is on a new\nline'

        # When
        format_value = format_multilined_string(self.autoescape_context,
                                                new_line)

        self.assertEqual(format_value, 'this is on a new<br>line')

    def test_format_multilined_string_matches_carriage_return_new_line(self):
        # Given
        new_line = 'this is on a new\r\nline'

        # When
        format_value = format_multilined_string(self.autoescape_context, new_line)

        self.assertEqual(format_value, 'this is on a new<br>line')

    def test_format_multilined_string(self):
        # Given
        new_line = 'this is\ron a\nnew\r\nline'

        # When
        format_value = format_multilined_string(self.autoescape_context,
                                                new_line)

        self.assertEqual(format_value, 'this is<br>on a<br>new<br>line')

    def test_format_multilined_string_auto_escape(self):
        # Given
        new_line = '<'

        # When
        format_value = format_multilined_string(self.autoescape_context, new_line)

        self.assertEqual(str(format_value), '&lt;')

    def test_get_current_date(self):
        # Given
        date_format = '%-d %B %Y'

        # When
        format_value = get_current_date(self.autoescape_context)
        current_date = as_london_tz(datetime.utcnow()).strftime(date_format)

        # Then
        self.assertEqual(format_value, "<span class='date'>{date}</span>".format(date=current_date))

    def test_format_date(self):
        # Given
        date = '2017-01-01'

        # When
        with self.app_request_context('/'):
            format_value = format_date(self.autoescape_context, date)

        # Then
        self.assertEqual(format_value, "<span class='date'>1 January 2017</span>")

    def test_format_date_month_year(self):
        # Given
        date = '2017-01'

        # When
        with self.app_request_context('/'):
            format_value = format_date(self.autoescape_context, date)

        # Then
        self.assertEqual(format_value, "<span class='date'>January 2017</span>")

    def test_format_date_markup(self):
        # Given
        date = [Markup('2017-01')]

        # When
        with self.app_request_context('/'):
            format_value = format_date(self.autoescape_context, date)

        # Then
        self.assertEqual(format_value, "<span class='date'>January 2017</span>")

    def test_format_date_non_string(self):
        # Given
        date = 123

        # When
        format_value = format_date(self.autoescape_context, date)

        # Then
        self.assertEqual(format_value, 123)

    def test_format_date_none(self):
        # Given
        date = None

        # When
        format_value = format_date(self.autoescape_context, date)

        # Then
        self.assertIsNone(format_value)

    def test_format_date_time_in_bst(self):
        # Given
        date_time = '2018-03-29T11:59:13.528680'

        # When
        with self.app_request_context('/'):
            format_value = format_datetime(self.autoescape_context, date_time)

        # Then
        self.assertEqual(format_value, "<span class='date'>29 March 2018 at 12:59</span>")

    def test_format_date_time_in_gmt(self):
        # Given
        date_time = '2018-10-28T11:59:13.528680'

        # When
        with self.app_request_context('/'):
            format_value = format_datetime(self.autoescape_context, date_time)

        # Then
        self.assertEqual(format_value, "<span class='date'>28 October 2018 at 11:59</span>")

    def test_format_conditional_date_not_date(self):
        # Given       no test for integers this check was removed from jinja_filters

        invalid_input = [('1', None),
                         ('1-1-1', None)]

        # When
        for nonsense in invalid_input:
            date1 = nonsense[0]
            date2 = nonsense[1]
            with self.assertRaises(Exception) as exception:
                format_conditional_date(self.autoescape_context, date1, date2)
        # Then
            self.assertIn("does not match format '%Y-%m'", str(exception.exception))

    def test_format_conditional_date_not_set(self):
        # Given

        # When
        with self.assertRaises(Exception) as exception:
            format_conditional_date(self.autoescape_context, None, None)

        # Then
        self.assertIn('No valid dates passed to format_conditional_dates filter', str(exception.exception))

    def test_format_conditional_date(self):
        # Given

        datelist = [('2016-01-12', '2016-02-12', '12 January 2016'),
                    ('2017-12-23', None, '23 December 2017'),
                    (None, '2017-12-24', '24 December 2017')]

        # When
        with self.app_request_context('/'):
            for triple in datelist:
                date1 = triple[0]
                date2 = triple[1]

                format_value = format_conditional_date(self.autoescape_context, date1, date2)

                # Then
                self.assertEqual(format_value, "<span class='date'>{date}</span>".format(date=triple[2]))

    def test_calculate_years_difference(self):
        with patch('app.setup.get_session_store', return_value=None):
            # Given
            ten_years_ago = (datetime.today()+relativedelta(years=-10)).strftime('%Y-%m-%d')

            date_list = [('2017-01-30', '2018-01-30', '1 year'),
                         ('2015-02-02', '2018-02-01', '2 years'),
                         ('2016-02-29', '2017-02-28', '1 year'),
                         ('2016-02-29', '2020-02-28', '3 years'),
                         (ten_years_ago, 'now', '10 years')]

            for dates in date_list:
                start_date = dates[0]
                end_date = dates[1]

                # When
                calculated_value = calculate_years_difference(start_date, end_date)

                # Then
                self.assertEqual(calculated_value, dates[2])

    def test_calculate_years_difference_none(self):
        # Given
        with self.assertRaises(Exception) as e:

            # When
            calculate_years_difference(None, '2017-01-17')

        # Then
        self.assertEqual('Valid date(s) not passed to calculate_years_difference filter', str(e.exception))

    def test_format_date_range(self):
        # Given
        start_date = '2017-01-01'
        end_date = '2017-01-31'

        # When
        with self.app_request_context('/'):
            format_value = format_date_range(self.autoescape_context, start_date, end_date)

        # Then
        self.assertEqual(format_value, "<span class='date'>1 January 2017</span> to <span class='date'>31 January 2017</span>")

    def test_format_date_range_missing_end_date(self):
        # Given
        start_date = '2017-01-01'

        # When
        with self.app_request_context('/'):
            format_value = format_date_range(self.autoescape_context, start_date)

        # Then
        self.assertEqual(format_value, "<span class='date'>1 January 2017</span>")

    def test_format_household_member_name(self):
        # Given
        name = ['John', 'Doe']

        # When
        format_value = format_household_member_name(name)

        self.assertEqual(format_value, 'John Doe')

    def test_format_household_member_name_no_surname(self):
        # Given
        name = ['John', '']

        # When
        format_value = format_household_member_name(name)

        self.assertEqual(format_value, 'John')

    def test_format_household_member_name_surname_is_none(self):
        # Given
        name = ['John', None]

        # When
        format_value = format_household_member_name(name)

        self.assertEqual(format_value, 'John')

    def test_format_household_member_name_no_first_name(self):
        # Given
        name = ['', 'Doe']

        # When
        format_value = format_household_member_name(name)

        self.assertEqual(format_value, 'Doe')

    def test_format_household_member_name_first_name_is_none(self):
        # Given
        name = [None, 'Doe']

        # When
        format_value = format_household_member_name(name)

        self.assertEqual(format_value, 'Doe')

    def test_format_household_member_name_first_middle_and_last(self):
        # Given
        name = ['John', 'J', 'Doe']

        # When
        format_value = format_household_member_name(name)

        self.assertEqual(format_value, 'John J Doe')

    def test_format_household_member_name_no_middle_name(self):
        # Given
        name = ['John', '', 'Doe']

        # When
        format_value = format_household_member_name(name)

        self.assertEqual(format_value, 'John Doe')

    def test_format_household_member_name_middle_name_is_none(self):
        # Given
        name = ['John', None, 'Doe']

        # When
        format_value = format_household_member_name(name)

        self.assertEqual(format_value, 'John Doe')

    def test_format_household_member_name_trim_spaces(self):
        # Given
        name = ['John  ', '   Doe   ']

        # When
        format_value = format_household_member_name(name)

        self.assertEqual(format_value, 'John Doe')

    def test_format_household_member_name_possessive(self):
        # Given
        name = ['John', 'Doe']

        # When
        format_value = format_household_member_name_possessive(name)

        self.assertEqual(format_value, 'John Doe\u2019s')

    def test_format_household_member_name_possessive_with_no_names(self):
        # Given
        name = [Undefined(), Undefined()]

        # When
        format_value = format_household_member_name_possessive(name)

        self.assertIsNone(format_value)

    def test_format_household_member_name_possessive_trailing_s(self):
        # Given
        name = ['John', 'Does']

        # When
        format_value = format_household_member_name_possessive(name)

        self.assertEqual(format_value, 'John Does\u2019')

    def test_concatenated_list(self):
        # Given
        list_items = ['1 The ONS', 'Newport', 'NP108XG']

        # When
        format_value = concatenated_list(list_items)

        self.assertEqual(format_value, '1 The ONS, Newport, NP108XG')

    def test_concatenated_list_one_entry(self):
        # Given
        list_items = ['One entry']

        # When
        format_value = concatenated_list(list_items)

        self.assertEqual(format_value, 'One entry')

    def test_concatenated_list_trim_white_spaces_and_trailing_commas(self):
        # Given
        list_items = ['', '1 The ONS  ', 'Newport  ', '  NP108XG', '']

        # When
        format_value = concatenated_list(list_items)

        self.assertEqual(format_value, '1 The ONS, Newport, NP108XG')

    def test_format_percentage(self):
        self.assertEqual(format_percentage('100'), '100%')
        self.assertEqual(format_percentage(100), '100%')
        self.assertEqual(format_percentage(4.5), '4.5%')

    def test_format_number_to_alphabetic_letter(self):
        self.assertEqual(format_number_to_alphabetic_letter(0), 'a')
        self.assertEqual(format_number_to_alphabetic_letter(4), 'e')
        self.assertEqual(format_number_to_alphabetic_letter(25), 'z')
        self.assertEqual(format_number_to_alphabetic_letter(-1), '')

    @patch('app.jinja_filters.flask_babel.get_locale', Mock(return_value='en_GB'))
    def test_format_unit(self):
        self.assertEqual(format_unit('length-meter', 100), '100 m')
        self.assertEqual(format_unit('length-centimeter', 100), '100 cm')
        self.assertEqual(format_unit('length-mile', 100), '100 mi')
        self.assertEqual(format_unit('length-kilometer', 100), '100 km')
        self.assertEqual(format_unit('area-square-meter', 100), '100 m²')
        self.assertEqual(format_unit('area-square-centimeter', 100), '100 cm²')
        self.assertEqual(format_unit('area-square-kilometer', 100), '100 km²')
        self.assertEqual(format_unit('area-square-mile', 100), '100 sq mi')
        self.assertEqual(format_unit('area-hectare', 100), '100 ha')
        self.assertEqual(format_unit('area-acre', 100), '100 ac')
        self.assertEqual(format_unit('volume-cubic-meter', 100), '100 m³')
        self.assertEqual(format_unit('volume-cubic-centimeter', 100), '100 cm³')
        self.assertEqual(format_unit('volume-liter', 100), '100 l')
        self.assertEqual(format_unit('volume-hectoliter', 100), '100 hl')
        self.assertEqual(format_unit('volume-megaliter', 100), '100 Ml')
        self.assertEqual(format_unit('duration-hour', 100), '100 hrs')
        self.assertEqual(format_unit('duration-hour', 100, 'long'), '100 hours')
        self.assertEqual(format_unit('duration-year', 100, 'long'), '100 years')

    @patch('app.jinja_filters.flask_babel.get_locale', Mock(return_value='cy'))
    def test_format_unit_welsh(self):
        self.assertEqual(format_unit('duration-hour', 100), '100 awr')
        self.assertEqual(format_unit('duration-year', 100), '100 bl')
        self.assertEqual(format_unit('duration-hour', 100, 'long'), '100 awr')
        self.assertEqual(format_unit('duration-year', 100, 'long'), '100 mlynedd')

    @patch('app.jinja_filters.flask_babel.get_locale', Mock(return_value='en_GB'))
    def test_format_unit_input_label(self):
        self.assertEqual(format_unit_input_label('length-meter'), 'm')
        self.assertEqual(format_unit_input_label('length-centimeter'), 'cm')
        self.assertEqual(format_unit_input_label('length-mile'), 'mi')
        self.assertEqual(format_unit_input_label('length-kilometer'), 'km')
        self.assertEqual(format_unit_input_label('area-square-meter'), 'm²')
        self.assertEqual(format_unit_input_label('area-square-centimeter'), 'cm²')
        self.assertEqual(format_unit_input_label('area-square-kilometer'), 'km²')
        self.assertEqual(format_unit_input_label('area-square-mile'), 'sq mi')
        self.assertEqual(format_unit_input_label('area-hectare'), 'ha')
        self.assertEqual(format_unit_input_label('area-acre'), 'ac')
        self.assertEqual(format_unit_input_label('volume-cubic-meter'), 'm³')
        self.assertEqual(format_unit_input_label('volume-cubic-centimeter'), 'cm³')
        self.assertEqual(format_unit_input_label('volume-liter'), 'l')
        self.assertEqual(format_unit_input_label('volume-hectoliter'), 'hl')
        self.assertEqual(format_unit_input_label('volume-megaliter'), 'Ml')
        self.assertEqual(format_unit_input_label('duration-hour'), 'hr')
        self.assertEqual(format_unit_input_label('duration-hour', 'long'), 'hours')
        self.assertEqual(format_unit_input_label('duration-year'), 'yr')
        self.assertEqual(format_unit_input_label('duration-year', 'long'), 'years')

    @patch('app.jinja_filters.flask_babel.get_locale', Mock(return_value='cy'))
    def test_format_unit_input_label_welsh(self):
        self.assertEqual(format_unit_input_label('duration-hour'), 'awr')
        self.assertEqual(format_unit_input_label('duration-hour', 'long'), 'awr')
        self.assertEqual(format_unit_input_label('duration-year'), 'bl')
        self.assertEqual(format_unit_input_label('duration-year', 'long'), 'flynedd')


    def test_format_year_month_duration(self):
        with self.app_request_context('/'):
            self.assertEqual(format_duration({'years': 5, 'months': 4}), '5 years 4 months')
            self.assertEqual(format_duration({'years': 5, 'months': 0}), '5 years')
            self.assertEqual(format_duration({'years': 0, 'months': 4}), '4 months')
            self.assertEqual(format_duration({'years': 1, 'months': 1}), '1 year 1 month')
            self.assertEqual(format_duration({'years': 0, 'months': 0}), '0 months')

    def test_format_year_duration(self):
        with self.app_request_context('/'):
            self.assertEqual(format_duration({'years': 5}), '5 years')
            self.assertEqual(format_duration({'years': 1}), '1 year')
            self.assertEqual(format_duration({'years': 0}), '0 years')

    def test_format_month_duration(self):
        with self.app_request_context('/'):
            self.assertEqual(format_duration({'months': 5}), '5 months')
            self.assertEqual(format_duration({'months': 1}), '1 month')
            self.assertEqual(format_duration({'months': 0}), '0 months')

    def test_format_unordered_list(self):
        list_items = [['item 1', 'item 2']]

        formatted_value = format_unordered_list(self.autoescape_context, list_items)

        expected_value = '<ul><li>item 1</li><li>item 2</li></ul>'

        self.assertEqual(expected_value, formatted_value)

    def test_format_unordered_list_with_no_input(self):
        list_items = []

        formatted_value = format_unordered_list(self.autoescape_context, list_items)

        self.assertEqual('', formatted_value)

    def test_format_unordered_list_with_empty_list(self):
        list_items = [[]]

        formatted_value = format_unordered_list(self.autoescape_context, list_items)

        self.assertEqual('', formatted_value)

    def test_max_value(self):
        # Given
        two_ints = (1, 2)

        # When
        max_of_two = max_value(*two_ints)

        # Then
        self.assertEqual(max_of_two, 2)

    def test_max_value_none(self):
        # Given
        one_int = (1, None)

        # When
        max_of_two = max_value(*one_int)

        # Then
        self.assertEqual(max_of_two, 1)

    def test_max_value_undefined(self):
        # Given
        args = ('foo', Undefined())

        # When
        with self.assertRaises(Exception) as exception:
            max_value(*args)

        # Then
        self.assertIn(
            "Cannot determine maximum of incompatible types max(<class 'str'>,"
            " <class 'jinja2.runtime.Undefined'>)", str(exception.exception))

    def test_max_values_incompatible(self):
        # Given
        args = (1, 'abc')

        # When
        with self.assertRaises(Exception) as exception:
            max_value(*args)

        # Then
        self.assertIn(
            "Cannot determine maximum of incompatible types max(<class 'int'>,"
            " <class 'str'>)", str(exception.exception))

    def test_max_values_compatible(self):
        # Given
        args = (-1, True)

        # When
        max_of_two = max_value(*args)

        # Then
        self.assertEqual(max_of_two, True)

    def test_max_value_str(self):
        # Given
        two_str = ('a', 'abc')

        # When
        max_of_two = max_value(*two_str)

        # Then
        self.assertEqual(max_of_two, 'abc')

    def test_max_value_date(self):
        # Given
        now = datetime.utcnow()
        then = now - timedelta(seconds=60)
        two_dates = (then, now)

        # When
        max_of_two = max_value(*two_dates)

        # Then
        self.assertEqual(max_of_two, now)

    def test_min_value(self):
        # Given
        two_ints = (1, 2)

        # When
        min_of_two = min_value(*two_ints)

        # Then
        self.assertEqual(min_of_two, 1)

    def test_min_value_none(self):
        # Given
        one_int = (1, None)

        # When
        min_of_two = min_value(*one_int)

        # Then
        self.assertEqual(min_of_two, 1)

    def test_min_value_undefined(self):
        # Given
        args = ('foo', Undefined())

        # When
        with self.assertRaises(Exception) as exception:
            min_value(*args)

        # Then
        self.assertIn(
            "Cannot determine minimum of incompatible types min(<class 'str'>,"
            " <class 'jinja2.runtime.Undefined'>)", str(exception.exception))

    def test_min_values_incompatible(self):
        # Given
        args = (1, 'abc')

        # When
        with self.assertRaises(Exception) as exception:
            min_value(*args)

        # Then
        self.assertIn(
            "Cannot determine minimum of incompatible types min(<class 'int'>,"
            " <class 'str'>)", str(exception.exception))

    def test_min_values_compatible(self):
        # Given
        args = (-1, True)

        # When
        min_of_two = min_value(*args)

        # Then
        self.assertEqual(min_of_two, -1)

    def test_min_value_str(self):
        # Given
        two_str = ('a', 'abc')

        # When
        min_of_two = min_value(*two_str)

        # Then
        self.assertEqual(min_of_two, 'a')

    def test_min_value_date(self):
        # Given
        now = datetime.utcnow()
        then = now - timedelta(seconds=60)
        two_dates = (then, now)

        # When
        min_of_two = min_value(*two_dates)

        # Then
        self.assertEqual(min_of_two, then)

    def test_get_question_title_with_title_value(self):
        # Given
        question_id = 'question'
        context = SimpleNamespace(
            parent={
                'question': {
                    'id': 'question',
                    'title': 'question_title'
                }
            }
        )

        # When
        title = get_question_title(context, question_id)

        # Then
        self.assertEqual(title, 'question_title')

    def test_get_question_title_with_question_titles(self):
        # Given
        question_id = 'question'
        context = SimpleNamespace(
            parent={
                'question': {
                    'id': 'question'
                },
                'content': {
                    'question_titles': {
                        'question': 'default_question_title'
                    }
                }
            }
        )

        # When
        title = get_question_title(context, question_id)

        # Then
        self.assertEqual(title, 'default_question_title')

    def test_get_answer_label_with_answer_label(self):
        # Given
        answer_id = 'answer'
        question_id = 'question'
        context = SimpleNamespace(
            parent={
                'question': {
                    'id': 'question',
                    'answers': [{
                        'id': 'answer',
                        'label': 'answer_label'
                    }]
                }
            }
        )

        # When
        answer_label = get_answer_label(context, answer_id, question_id)

        # Then
        self.assertEqual(answer_label, 'answer_label')

    def test_get_answer_label_with_no_answer_label_and_title(self):
        # Given
        answer_id = 'answer'
        question_id = 'question'
        context = SimpleNamespace(
            parent={
                'question': {
                    'id': 'question',
                    'title': 'question_title',
                    'answers': [{
                        'id': 'answer'
                    }]
                }
            }
        )

        # When
        answer_label = get_answer_label(context, answer_id, question_id)

        # Then
        self.assertEqual(answer_label, 'question_title')

    def test_get_answer_label_with_no_answer_label_and_question_titles(self):
        # Given
        answer_id = 'answer'
        question_id = 'question'
        context = SimpleNamespace(
            parent={
                'question': {
                    'id': 'question',
                    'answers': [{
                        'id': 'answer'
                    }]
                },
                'content': {
                    'question_titles': {
                        'question': 'default_question_title'
                    }
                }
            }
        )

        # When
        answer_label = get_answer_label(context, answer_id, question_id)

        # Then
        self.assertEqual(answer_label, 'default_question_title')

    def test_offset_date_from_day(self):
        test_cases = [
            # (Input Date, offset, day of week, expected output)
            ('2018-08-10', {}, 'SU', '2018-08-05'), # Friday outputs previous Sunday
            ('2018-08-05', {}, 'SU', '2018-07-29'), # Sunday outputs previous Sunday (Must be a full Sunday)
            ('2018-08-06', {}, 'SU', '2018-08-05'), # Monday outputs previous Sunday
            ('2018-08-06', {'days': -1}, 'SU', '2018-08-04'), # Previous sunday with -1 day offset
            ('2018-08-05', {'weeks': 1}, 'SU', '2018-08-05'), # Previous sunday with +1 month offset, back to input
            ('2018-08-10', {}, 'FR', '2018-08-03'), # Friday outputs previous Friday
            ('2018-08-10T13:32:20.365665', {}, 'FR', '2018-08-03'), # Ensure we can handle datetime input
            ('2018-08-10', {'weeks': 4}, 'FR', '2018-08-31'), # Friday outputs previous Friday + 4 weeks
            ('2018-08-10', {'bad_period': 4}, 'FR', '2018-08-03'), # Friday outputs previous Friday + nothing
            ('2018-08-10', {'years': 1}, 'FR', '2019-08-03'), # Friday outputs previous Friday + 1 year
            ('2018-08-10', {'years': 1, 'weeks': 1, 'days': 1}, 'FR', '2019-08-11'), # Friday outputs previous Friday + 1 year + 1 week + 1 day
        ]
        for case in test_cases:
            self.assertEqual(calculate_offset_from_weekday_in_last_whole_week(*case[0:3]), case[3])

    def test_bad_day_of_week_offset_date_from_day(self):
        with self.assertRaises(Exception):
            calculate_offset_from_weekday_in_last_whole_week('2018-08-10', {}, 'BA')

    def test_offset_date_defaults_to_now_if_date_not_passed(self):
        with patch('app.jinja_filters.datetime') as mock_datetime:
            # pylint: disable=unnecessary-lambda
            mock_datetime.utcnow.return_value = datetime(2018, 8, 10)
            mock_datetime.strftime.side_effect = lambda *args, **kw: datetime.strftime(*args, **kw)

            result = calculate_offset_from_weekday_in_last_whole_week(None, {}, 'SU')
            self.assertEqual(result, '2018-08-05')

    def test_format_date_custom(self):
        test_cases = [
            # Input Date, date format, show year
            ('2018-08-14', 'EEEE d MMMM YYYY', 'Tuesday 14 August 2018'),
            ('2018-08-14', 'EEEE d MMMM', 'Tuesday 14 August'),
            ('2018-08-14', 'EEEE d', 'Tuesday 14'),
            ('2018-08-14', 'd MMMM YYYY', '14 August 2018'),
        ]

        with self.app_request_context('/'):
            for case in test_cases:
                self.assertEqual(
                    format_date_custom(self.autoescape_context, *case[0:2]),
                    "<span class='date'>{}</span>".format(case[2])
                )

    def test_format_date_range_no_repeated_month_year(self):
        test_cases = [
            # Start Date, End Date, Date Format, Output Expected First, Output Expected Second
            ('2018-08-14', '2018-08-16', 'EEEE d MMMM YYYY', 'Tuesday 14', 'Thursday 16 August 2018'),
            ('2018-07-31', '2018-08-16', 'EEEE d MMMM YYYY', 'Tuesday 31 July', 'Thursday 16 August 2018'),
            ('2017-12-31', '2018-08-16', 'EEEE d MMMM YYYY', 'Sunday 31 December 2017', 'Thursday 16 August 2018'),
            ('2017-12-31', '2018-08-16', 'MMMM YYYY', 'December 2017', 'August 2018'),
            ('2018-08-14', '2018-08-16', 'MMMM YYYY', 'August 2018', 'August 2018'),
            ('2017-12-31', '2018-08-16', 'YYYY', '2017', '2018'),
            ('2017-07-31', '2018-08-16', 'YYYY', '2017', '2018'),
            ('2018-08-14', '2018-08-16', 'EEEE d', 'Tuesday 14', 'Thursday 16')
        ]

        with self.app_request_context('/'):
            for case in test_cases:
                self.assertEqual(
                    format_date_range_no_repeated_month_year(self.autoescape_context, *case[0:3]),
                    "<span class='date'>{}</span> to <span class='date'>{}</span>".format(case[3], case[4])
                )

    @patch('app.jinja_filters.format_unordered_list')
    def test_format_repeated_summaries_unformatted(self, patched_format): # pylint: disable=no-self-use

        test_cases = [
            # (input list, expected output)
            ([['John', 'Smith'], [['Jane', 'Sarah'], ['Smith', 'Smythe']]], ['John Smith', 'Jane Smith', 'Sarah Smythe']),
            ([['John', 'Smith']], ['John Smith']),
            ([['John', 'Smith'], ['Andy', 'Smith'], ['David', 'Smith']], ['John Smith', 'Andy Smith', 'David Smith']),
            ([[['Jane', 'Sarah'], ['Smith', 'Smith']]], ['Jane Smith', 'Sarah Smith']),
            ([[['David', 'Sarah'], ['Smith', 'Smith']]], ['David Smith', 'Sarah Smith']),
            ([[['David', 'Sarah'], ['', 'Smith']]], ['David', 'Sarah Smith']),
            ([['John', 'Smith'], [[], []]], ['John Smith'])
        ]

        for case in test_cases:
            format_repeating_summary(None, case[0])
            # Format unordered list takes a list of lists
            patched_format.assert_called_with(None, [[Markup(x) for x in case[1]]])

    def test_format_repeated_summaries_no_input(self):

        self.assertEqual('', format_repeating_summary(None, []))

    def test_format_repeated_summaries_delimiters(self):
        self.autoescape_context = Mock(autoescape=True)
        output = format_repeating_summary(self.autoescape_context, [['', '51 Testing Gardens', '', 'Bristol', 'BS9 1AW']], delimiter=', ')
        self.assertEqual(output, '<ul><li>51 Testing Gardens, Bristol, BS9 1AW</li></ul>')

    def test_format_address_list_undefined_values(self):
        user_entered_address = [Undefined(), Undefined(), Undefined(), Undefined(), Undefined()]
        metadata_address = ['123', 'Testy', 'Place', 'Newport', 'NP5 7AR']
        self.assertEqual('123<br />Testy<br />Place<br />Newport<br />NP5 7AR',
                         format_address_list(user_entered_address, metadata_address))

    def test_format_address_list_missing_values(self):
        user_entered_address = ['44', 'Testing', '', 'Swansea', '']
        metadata_address = ['123', 'Testy', 'Place', 'Newport', 'NP5 7AR']
        self.assertEqual('44<br />Testing<br />Swansea',
                         format_address_list(user_entered_address, metadata_address))

    def test_format_address_list_None_value(self):
        user_entered_address = [None, None, None, None, None]
        metadata_address = [None, None, None, None, None]
        with self.assertRaises(Exception):
            format_address_list(user_entered_address, metadata_address)

    def test_format_address_list_no_values_in_answer(self):
        user_entered_address = ['', '', '', '', '']
        metadata_address = ['123', 'Testy', 'Place', 'Newport', 'NP5 7AR']
        self.assertEqual('123<br />Testy<br />Place<br />Newport<br />NP5 7AR',
                         format_address_list(user_entered_address, metadata_address))

    def test_format_address_list_no_metadata(self):
        user_entered_address = ['44', 'Testing', 'Gardens', 'Swansea', 'SA1 1AA']
        metadata_address = []
        self.assertEqual('44<br />Testing<br />Gardens<br />Swansea<br />SA1 1AA',
                         format_address_list(user_entered_address, metadata_address))

    def test_format_address_list(self):
        user_entered_address = ['44', 'Testing', 'Gardens', 'Swansea', 'SA1 1AA']
        metadata_address = ['123', 'Testy', 'Place', 'Newport', 'NP5 7AR']
        self.assertEqual('44<br />Testing<br />Gardens<br />Swansea<br />SA1 1AA',
                         format_address_list(user_entered_address, metadata_address))

    def test_format_address_list_concatenated_list_no_values(self):
        answer_address = ['', '', '']
        metadata_address = ['', '', '']

        with self.assertRaises(Exception) as error:
            format_address_list(answer_address, metadata_address)

        self.assertEqual('No valid address passed to format_address_list filter', error.exception.args[0])

[(888, 'unittest.mock.patch', 'patch', (['"""app.jinja_filters.format_unordered_list"""'], {}), False, 'from unittest.mock import patch\n'), (27, 'mock.Mock', 'Mock', ([], {'autoescape': '(True)'}), False, 'from mock import Mock\n'), (30, 'mock.Mock', 'Mock', ([], {'return_value': '"""en_GB"""'}), False, 'from mock import Mock\n'), (45, 'mock.Mock', 'Mock', ([], {'return_value': '"""en_GB"""'}), False, 'from mock import Mock\n'), (53, 'mock.Mock', 'Mock', ([], {'return_value': '"""en_GB"""'}), False, 'from mock import Mock\n'), (64, 'mock.Mock', 'Mock', ([], {'return_value': '"""en_GB"""'}), False, 'from mock import Mock\n'), (83, 'app.jinja_filters.format_multilined_string', 'format_multilined_string', (['self.autoescape_context', 'new_line'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (92, 'app.jinja_filters.format_multilined_string', 'format_multilined_string', (['self.autoescape_context', 'new_line'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (102, 'app.jinja_filters.format_multilined_string', 'format_multilined_string', (['self.autoescape_context', 'new_line'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (111, 'app.jinja_filters.format_multilined_string', 'format_multilined_string', (['self.autoescape_context', 'new_line'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (121, 'app.jinja_filters.format_multilined_string', 'format_multilined_string', (['self.autoescape_context', 'new_line'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (130, 'app.jinja_filters.get_current_date', 'get_current_date', (['self.autoescape_context'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (174, 'app.jinja_filters.format_date', 'format_date', (['self.autoescape_context', 'date'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (184, 'app.jinja_filters.format_date', 'format_date', (['self.autoescape_context', 'date'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (313, 'app.jinja_filters.format_household_member_name', 'format_household_member_name', (['name'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (322, 'app.jinja_filters.format_household_member_name', 'format_household_member_name', (['name'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (331, 'app.jinja_filters.format_household_member_name', 'format_household_member_name', (['name'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (340, 'app.jinja_filters.format_household_member_name', 'format_household_member_name', (['name'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (349, 'app.jinja_filters.format_household_member_name', 'format_household_member_name', (['name'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (358, 'app.jinja_filters.format_household_member_name', 'format_household_member_name', (['name'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (367, 'app.jinja_filters.format_household_member_name', 'format_household_member_name', (['name'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (376, 'app.jinja_filters.format_household_member_name', 'format_household_member_name', (['name'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (385, 'app.jinja_filters.format_household_member_name', 'format_household_member_name', (['name'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (394, 'app.jinja_filters.format_household_member_name_possessive', 'format_household_member_name_possessive', (['name'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (403, 'app.jinja_filters.format_household_member_name_possessive', 'format_household_member_name_possessive', (['name'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (412, 'app.jinja_filters.format_household_member_name_possessive', 'format_household_member_name_possessive', (['name'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (421, 'app.jinja_filters.concatenated_list', 'concatenated_list', (['list_items'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (430, 'app.jinja_filters.concatenated_list', 'concatenated_list', (['list_items'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (439, 'app.jinja_filters.concatenated_list', 'concatenated_list', (['list_items'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (454, 'mock.Mock', 'Mock', ([], {'return_value': '"""en_GB"""'}), False, 'from mock import Mock\n'), (475, 'mock.Mock', 'Mock', ([], {'return_value': '"""cy"""'}), False, 'from mock import Mock\n'), (482, 'mock.Mock', 'Mock', ([], {'return_value': '"""en_GB"""'}), False, 'from mock import Mock\n'), (504, 'mock.Mock', 'Mock', ([], {'return_value': '"""cy"""'}), False, 'from mock import Mock\n'), (535, 'app.jinja_filters.format_unordered_list', 'format_unordered_list', (['self.autoescape_context', 'list_items'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (544, 'app.jinja_filters.format_unordered_list', 'format_unordered_list', (['self.autoescape_context', 'list_items'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (551, 'app.jinja_filters.format_unordered_list', 'format_unordered_list', (['self.autoescape_context', 'list_items'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (560, 'app.jinja_filters.max_value', 'max_value', (['*two_ints'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (570, 'app.jinja_filters.max_value', 'max_value', (['*one_int'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (606, 'app.jinja_filters.max_value', 'max_value', (['*args'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (616, 'app.jinja_filters.max_value', 'max_value', (['*two_str'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (623, 'datetime.datetime.utcnow', 'datetime.utcnow', ([], {}), False, 'from datetime import datetime, timedelta\n'), (628, 'app.jinja_filters.max_value', 'max_value', (['*two_dates'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (638, 'app.jinja_filters.min_value', 'min_value', (['*two_ints'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (648, 'app.jinja_filters.min_value', 'min_value', (['*one_int'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (684, 'app.jinja_filters.min_value', 'min_value', (['*args'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (694, 'app.jinja_filters.min_value', 'min_value', (['*two_str'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (701, 'datetime.datetime.utcnow', 'datetime.utcnow', ([], {}), False, 'from datetime import datetime, timedelta\n'), (706, 'app.jinja_filters.min_value', 'min_value', (['*two_dates'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (714, 'types.SimpleNamespace', 'SimpleNamespace', ([], {'parent': "{'question': {'id': 'question', 'title': 'question_title'}}"}), False, 'from types import SimpleNamespace\n'), (724, 'app.jinja_filters.get_question_title', 'get_question_title', (['context', 'question_id'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (732, 'types.SimpleNamespace', 'SimpleNamespace', ([], {'parent': "{'question': {'id': 'question'}, 'content': {'question_titles': {'question':\n    'default_question_title'}}}"}), False, 'from types import SimpleNamespace\n'), (746, 'app.jinja_filters.get_question_title', 'get_question_title', (['context', 'question_id'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (755, 'types.SimpleNamespace', 'SimpleNamespace', ([], {'parent': "{'question': {'id': 'question', 'answers': [{'id': 'answer', 'label':\n    'answer_label'}]}}"}), False, 'from types import SimpleNamespace\n'), (768, 'app.jinja_filters.get_answer_label', 'get_answer_label', (['context', 'answer_id', 'question_id'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (777, 'types.SimpleNamespace', 'SimpleNamespace', ([], {'parent': "{'question': {'id': 'question', 'title': 'question_title', 'answers': [{\n    'id': 'answer'}]}}"}), False, 'from types import SimpleNamespace\n'), (790, 'app.jinja_filters.get_answer_label', 'get_answer_label', (['context', 'answer_id', 'question_id'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (799, 'types.SimpleNamespace', 'SimpleNamespace', ([], {'parent': "{'question': {'id': 'question', 'answers': [{'id': 'answer'}]}, 'content':\n    {'question_titles': {'question': 'default_question_title'}}}"}), False, 'from types import SimpleNamespace\n'), (816, 'app.jinja_filters.get_answer_label', 'get_answer_label', (['context', 'answer_id', 'question_id'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (912, 'mock.Mock', 'Mock', ([], {'autoescape': '(True)'}), False, 'from mock import Mock\n'), (913, 'app.jinja_filters.format_repeating_summary', 'format_repeating_summary', (['self.autoescape_context', "[['', '51 Testing Gardens', '', 'Bristol', 'BS9 1AW']]"], {'delimiter': '""", """'}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (32, 'app.jinja_filters.format_currency_for_input', 'format_currency_for_input', (['"""100"""', '(2)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (33, 'app.jinja_filters.format_currency_for_input', 'format_currency_for_input', (['"""100.0"""', '(2)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (34, 'app.jinja_filters.format_currency_for_input', 'format_currency_for_input', (['"""100.00"""', '(2)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (35, 'app.jinja_filters.format_currency_for_input', 'format_currency_for_input', (['"""1000"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (36, 'app.jinja_filters.format_currency_for_input', 'format_currency_for_input', (['"""10000"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (37, 'app.jinja_filters.format_currency_for_input', 'format_currency_for_input', (['"""100000000"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (38, 'app.jinja_filters.format_currency_for_input', 'format_currency_for_input', (['"""100000000"""', '(2)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (39, 'app.jinja_filters.format_currency_for_input', 'format_currency_for_input', (['(0)', '(2)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (40, 'app.jinja_filters.format_currency_for_input', 'format_currency_for_input', (['(0)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (41, 'app.jinja_filters.format_currency_for_input', 'format_currency_for_input', (['""""""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (42, 'app.jinja_filters.format_currency_for_input', 'format_currency_for_input', (['None'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (47, 'app.jinja_filters.get_currency_symbol', 'get_currency_symbol', (['"""GBP"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (48, 'app.jinja_filters.get_currency_symbol', 'get_currency_symbol', (['"""EUR"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (49, 'app.jinja_filters.get_currency_symbol', 'get_currency_symbol', (['"""USD"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (50, 'app.jinja_filters.get_currency_symbol', 'get_currency_symbol', (['"""JPY"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (51, 'app.jinja_filters.get_currency_symbol', 'get_currency_symbol', (['""""""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (55, 'app.jinja_filters.format_currency', 'format_currency', (['self.autoescape_context', '"""11"""', '"""GBP"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (56, 'app.jinja_filters.format_currency', 'format_currency', (['self.autoescape_context', '"""11.99"""', '"""GBP"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (57, 'app.jinja_filters.format_currency', 'format_currency', (['self.autoescape_context', '"""11000"""', '"""USD"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (58, 'app.jinja_filters.format_currency', 'format_currency', (['self.autoescape_context', '(0)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (59, 'app.jinja_filters.format_currency', 'format_currency', (['self.autoescape_context', '(0.0)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (60, 'app.jinja_filters.format_currency', 'format_currency', (['self.autoescape_context', '""""""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (61, 'app.jinja_filters.format_currency', 'format_currency', (['self.autoescape_context', 'None'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (66, 'app.jinja_filters.format_number', 'format_number', (['(123)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (67, 'app.jinja_filters.format_number', 'format_number', (['"""123.4"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (68, 'app.jinja_filters.format_number', 'format_number', (['"""123.40"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (69, 'app.jinja_filters.format_number', 'format_number', (['"""1000"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (70, 'app.jinja_filters.format_number', 'format_number', (['"""10000"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (71, 'app.jinja_filters.format_number', 'format_number', (['"""100000000"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (72, 'app.jinja_filters.format_number', 'format_number', (['(0)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (73, 'app.jinja_filters.format_number', 'format_number', (['(0.0)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (74, 'app.jinja_filters.format_number', 'format_number', (['""""""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (75, 'app.jinja_filters.format_number', 'format_number', (['None'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (142, 'app.jinja_filters.format_date', 'format_date', (['self.autoescape_context', 'date'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (153, 'app.jinja_filters.format_date', 'format_date', (['self.autoescape_context', 'date'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (160, 'jinja2.Markup', 'Markup', (['"""2017-01"""'], {}), False, 'from jinja2 import Undefined, Markup\n'), (164, 'app.jinja_filters.format_date', 'format_date', (['self.autoescape_context', 'date'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (195, 'app.jinja_filters.format_datetime', 'format_datetime', (['self.autoescape_context', 'date_time'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (206, 'app.jinja_filters.format_datetime', 'format_datetime', (['self.autoescape_context', 'date_time'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (231, 'app.jinja_filters.format_conditional_date', 'format_conditional_date', (['self.autoescape_context', 'None', 'None'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (255, 'unittest.mock.patch', 'patch', (['"""app.setup.get_session_store"""'], {'return_value': 'None'}), False, 'from unittest.mock import patch\n'), (280, 'app.jinja_filters.calculate_years_difference', 'calculate_years_difference', (['None', '"""2017-01-17"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (292, 'app.jinja_filters.format_date_range', 'format_date_range', (['self.autoescape_context', 'start_date', 'end_date'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (303, 'app.jinja_filters.format_date_range', 'format_date_range', (['self.autoescape_context', 'start_date'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (400, 'jinja2.Undefined', 'Undefined', ([], {}), False, 'from jinja2 import Undefined, Markup\n'), (400, 'jinja2.Undefined', 'Undefined', ([], {}), False, 'from jinja2 import Undefined, Markup\n'), (444, 'app.jinja_filters.format_percentage', 'format_percentage', (['"""100"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (445, 'app.jinja_filters.format_percentage', 'format_percentage', (['(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (446, 'app.jinja_filters.format_percentage', 'format_percentage', (['(4.5)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (449, 'app.jinja_filters.format_number_to_alphabetic_letter', 'format_number_to_alphabetic_letter', (['(0)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (450, 'app.jinja_filters.format_number_to_alphabetic_letter', 'format_number_to_alphabetic_letter', (['(4)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (451, 'app.jinja_filters.format_number_to_alphabetic_letter', 'format_number_to_alphabetic_letter', (['(25)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (452, 'app.jinja_filters.format_number_to_alphabetic_letter', 'format_number_to_alphabetic_letter', (['(-1)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (456, 'app.jinja_filters.format_unit', 'format_unit', (['"""length-meter"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (457, 'app.jinja_filters.format_unit', 'format_unit', (['"""length-centimeter"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (458, 'app.jinja_filters.format_unit', 'format_unit', (['"""length-mile"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (459, 'app.jinja_filters.format_unit', 'format_unit', (['"""length-kilometer"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (460, 'app.jinja_filters.format_unit', 'format_unit', (['"""area-square-meter"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (461, 'app.jinja_filters.format_unit', 'format_unit', (['"""area-square-centimeter"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (462, 'app.jinja_filters.format_unit', 'format_unit', (['"""area-square-kilometer"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (463, 'app.jinja_filters.format_unit', 'format_unit', (['"""area-square-mile"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (464, 'app.jinja_filters.format_unit', 'format_unit', (['"""area-hectare"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (465, 'app.jinja_filters.format_unit', 'format_unit', (['"""area-acre"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (466, 'app.jinja_filters.format_unit', 'format_unit', (['"""volume-cubic-meter"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (467, 'app.jinja_filters.format_unit', 'format_unit', (['"""volume-cubic-centimeter"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (468, 'app.jinja_filters.format_unit', 'format_unit', (['"""volume-liter"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (469, 'app.jinja_filters.format_unit', 'format_unit', (['"""volume-hectoliter"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (470, 'app.jinja_filters.format_unit', 'format_unit', (['"""volume-megaliter"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (471, 'app.jinja_filters.format_unit', 'format_unit', (['"""duration-hour"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (472, 'app.jinja_filters.format_unit', 'format_unit', (['"""duration-hour"""', '(100)', '"""long"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (473, 'app.jinja_filters.format_unit', 'format_unit', (['"""duration-year"""', '(100)', '"""long"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (477, 'app.jinja_filters.format_unit', 'format_unit', (['"""duration-hour"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (478, 'app.jinja_filters.format_unit', 'format_unit', (['"""duration-year"""', '(100)'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (479, 'app.jinja_filters.format_unit', 'format_unit', (['"""duration-hour"""', '(100)', '"""long"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (480, 'app.jinja_filters.format_unit', 'format_unit', (['"""duration-year"""', '(100)', '"""long"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (484, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""length-meter"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (485, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""length-centimeter"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (486, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""length-mile"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (487, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""length-kilometer"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (488, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""area-square-meter"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (489, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""area-square-centimeter"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (490, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""area-square-kilometer"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (491, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""area-square-mile"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (492, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""area-hectare"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (493, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""area-acre"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (494, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""volume-cubic-meter"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (495, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""volume-cubic-centimeter"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (496, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""volume-liter"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (497, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""volume-hectoliter"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (498, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""volume-megaliter"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (499, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""duration-hour"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (500, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""duration-hour"""', '"""long"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (501, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""duration-year"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (502, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""duration-year"""', '"""long"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (506, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""duration-hour"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (507, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""duration-hour"""', '"""long"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (508, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""duration-year"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (509, 'app.jinja_filters.format_unit_input_label', 'format_unit_input_label', (['"""duration-year"""', '"""long"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (577, 'jinja2.Undefined', 'Undefined', ([], {}), False, 'from jinja2 import Undefined, Markup\n'), (581, 'app.jinja_filters.max_value', 'max_value', (['*args'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (594, 'app.jinja_filters.max_value', 'max_value', (['*args'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (624, 'datetime.timedelta', 'timedelta', ([], {'seconds': '(60)'}), False, 'from datetime import datetime, timedelta\n'), (655, 'jinja2.Undefined', 'Undefined', ([], {}), False, 'from jinja2 import Undefined, Markup\n'), (659, 'app.jinja_filters.min_value', 'min_value', (['*args'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (672, 'app.jinja_filters.min_value', 'min_value', (['*args'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (702, 'datetime.timedelta', 'timedelta', ([], {'seconds': '(60)'}), False, 'from datetime import datetime, timedelta\n'), (841, 'app.jinja_filters.calculate_offset_from_weekday_in_last_whole_week', 'calculate_offset_from_weekday_in_last_whole_week', (['"""2018-08-10"""', '{}', '"""BA"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (844, 'unittest.mock.patch', 'patch', (['"""app.jinja_filters.datetime"""'], {}), False, 'from unittest.mock import patch\n'), (846, 'datetime.datetime', 'datetime', (['(2018)', '(8)', '(10)'], {}), False, 'from datetime import datetime, timedelta\n'), (849, 'app.jinja_filters.calculate_offset_from_weekday_in_last_whole_week', 'calculate_offset_from_weekday_in_last_whole_week', (['None', '{}', '"""SU"""'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (903, 'app.jinja_filters.format_repeating_summary', 'format_repeating_summary', (['None', 'case[0]'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (909, 'app.jinja_filters.format_repeating_summary', 'format_repeating_summary', (['None', '[]'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (917, 'jinja2.Undefined', 'Undefined', ([], {}), False, 'from jinja2 import Undefined, Markup\n'), (917, 'jinja2.Undefined', 'Undefined', ([], {}), False, 'from jinja2 import Undefined, Markup\n'), (917, 'jinja2.Undefined', 'Undefined', ([], {}), False, 'from jinja2 import Undefined, Markup\n'), (917, 'jinja2.Undefined', 'Undefined', ([], {}), False, 'from jinja2 import Undefined, Markup\n'), (917, 'jinja2.Undefined', 'Undefined', ([], {}), False, 'from jinja2 import Undefined, Markup\n'), (920, 'app.jinja_filters.format_address_list', 'format_address_list', (['user_entered_address', 'metadata_address'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (926, 'app.jinja_filters.format_address_list', 'format_address_list', (['user_entered_address', 'metadata_address'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (932, 'app.jinja_filters.format_address_list', 'format_address_list', (['user_entered_address', 'metadata_address'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (938, 'app.jinja_filters.format_address_list', 'format_address_list', (['user_entered_address', 'metadata_address'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (944, 'app.jinja_filters.format_address_list', 'format_address_list', (['user_entered_address', 'metadata_address'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (950, 'app.jinja_filters.format_address_list', 'format_address_list', (['user_entered_address', 'metadata_address'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (957, 'app.jinja_filters.format_address_list', 'format_address_list', (['answer_address', 'metadata_address'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (43, 'jinja2.Undefined', 'Undefined', ([], {}), False, 'from jinja2 import Undefined, Markup\n'), (62, 'jinja2.Undefined', 'Undefined', ([], {}), False, 'from jinja2 import Undefined, Markup\n'), (76, 'jinja2.Undefined', 'Undefined', ([], {}), False, 'from jinja2 import Undefined, Markup\n'), (222, 'app.jinja_filters.format_conditional_date', 'format_conditional_date', (['self.autoescape_context', 'date1', 'date2'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (249, 'app.jinja_filters.format_conditional_date', 'format_conditional_date', (['self.autoescape_context', 'date1', 'date2'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (270, 'app.jinja_filters.calculate_years_difference', 'calculate_years_difference', (['start_date', 'end_date'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (514, 'app.jinja_filters.format_duration', 'format_duration', (["{'years': 5, 'months': 4}"], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (515, 'app.jinja_filters.format_duration', 'format_duration', (["{'years': 5, 'months': 0}"], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (516, 'app.jinja_filters.format_duration', 'format_duration', (["{'years': 0, 'months': 4}"], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (517, 'app.jinja_filters.format_duration', 'format_duration', (["{'years': 1, 'months': 1}"], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (518, 'app.jinja_filters.format_duration', 'format_duration', (["{'years': 0, 'months': 0}"], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (522, 'app.jinja_filters.format_duration', 'format_duration', (["{'years': 5}"], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (523, 'app.jinja_filters.format_duration', 'format_duration', (["{'years': 1}"], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (524, 'app.jinja_filters.format_duration', 'format_duration', (["{'years': 0}"], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (528, 'app.jinja_filters.format_duration', 'format_duration', (["{'months': 5}"], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (529, 'app.jinja_filters.format_duration', 'format_duration', (["{'months': 1}"], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (530, 'app.jinja_filters.format_duration', 'format_duration', (["{'months': 0}"], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (837, 'app.jinja_filters.calculate_offset_from_weekday_in_last_whole_week', 'calculate_offset_from_weekday_in_last_whole_week', (['*case[0:3]'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (847, 'datetime.datetime.strftime', 'datetime.strftime', (['*args'], {}), False, 'from datetime import datetime, timedelta\n'), (131, 'datetime.datetime.utcnow', 'datetime.utcnow', ([], {}), False, 'from datetime import datetime, timedelta\n'), (864, 'app.jinja_filters.format_date_custom', 'format_date_custom', (['self.autoescape_context', '*case[0:2]'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (884, 'app.jinja_filters.format_date_range_no_repeated_month_year', 'format_date_range_no_repeated_month_year', (['self.autoescape_context', '*case[0:3]'], {}), False, 'from app.jinja_filters import format_date, format_conditional_date, format_currency, get_currency_symbol, format_multilined_string, format_percentage, format_date_range, format_household_member_name, format_datetime, format_number_to_alphabetic_letter, format_unit, format_currency_for_input, format_number, format_unordered_list, format_unit_input_label, format_household_member_name_possessive, concatenated_list, calculate_years_difference, get_current_date, as_london_tz, max_value, min_value, get_question_title, get_answer_label, format_duration, calculate_offset_from_weekday_in_last_whole_week, format_date_custom, format_date_range_no_repeated_month_year, format_repeating_summary, format_address_list\n'), (257, 'datetime.datetime.today', 'datetime.today', ([], {}), False, 'from datetime import datetime, timedelta\n'), (257, 'dateutil.relativedelta.relativedelta', 'relativedelta', ([], {'years': '(-10)'}), False, 'from dateutil.relativedelta import relativedelta\n'), (905, 'jinja2.Markup', 'Markup', (['x'], {}), False, 'from jinja2 import Undefined, Markup\n')]