@@ -0,0 +1,2169 @@
+from django.test import SimpleTestCase%0Afrom ...profile_data.indicators import (%0A    IncomeAdjustments,%0A)%0Afrom collections import defaultdict%0A%0Aclass MockAPIData:%0A    references = defaultdict(lambda: %22foobar%22)%0A    def __init__(self, results, years):%0A        self.results = results%0A        self.years = years%0A%0A%0Aclass RevenueSourcesTests(SimpleTestCase):%0A    maxDiff = None%0A%0A    def test_v1(self):%0A        %22%22%22%0A        - local and government are summed correctly%0A        - total is calculated correctly%0A        - percentages are calculated correctly%0A        - latest audit year is used, other years ignored%0A        %22%22%22%0A        api_data = MockAPIData(%0A            %7B%0A                %22revenue_budget_actual_v1%22: %5B%0A                    %7B%0A                        %22item.code%22: %221300%22,%0A                        %22amount.sum%22: 200,%0A                        %22financial_year_end.year%22: 2050,%0A                        %22amount_type.code%22: %22ORGB%22,%0A                    %7D,%0A                    %7B%0A                        %22item.code%22: %221300%22,%0A                        %22amount.sum%22: 210,%0A                        %22financial_year_end.year%22: 2050,%0A                        %22amount_type.code%22: %22ADJB%22,%0A                    %7D,%0A                    %7B%0A                        %22item.code%22: %221300%22,%0A                        %22amount.sum%22: 220,%0A                        %22financial_year_end.year%22: 2050,%0A                        %22amount_type.code%22: %22AUDA%22,%0A                    %7D,%0A                %5D,%0A                %22revenue_budget_actual_v2%22: %5B%5D,%0A            %7D,%0A            %5B2050, 2049, 2048, 2047%5D%0A        )%0A        expected = %7B%0A            2050: %5B%0A                %7B%0A                    %22item%22: %22Fines%22,%0A                    %22amount%22: 10,%0A                    %22comparison%22: %22Original to adjusted budget%22,%0A                    %22percent_changed%22: 5%0A                %7D,%0A                %7B%0A                    %22item%22: %22Fines%22,%0A                    %22amount%22: 20,%0A                    %22comparison%22: %22Original budget to audited outcome%22,%0A                    %22percent_changed%22: 10%0A                %7D,%0A            %5D%0A        %7D%0A        actual = IncomeAdjustments.get_muni_specifics(api_data)%0A        self.assertEqual(expected, actual)%0A

Add working test for minimal income adjustment functionality