diff --git a/end_of_month/test/test_end_of_month_process.py b/end_of_month/test/test_end_of_month_process.py index 70109d8d..686cfbc9 100644 --- a/end_of_month/test/test_end_of_month_process.py +++ b/end_of_month/test/test_end_of_month_process.py @@ -112,7 +112,7 @@ def test_end_of_month_mar(self): self.assertEqual(count, 129) -class TestReadArchivedForecastTest: +class TestReadArchivedForecast: @pytest.fixture(autouse=True) def _setup(self, db): self.archived_figure = [0 for _ in range(16)] @@ -329,7 +329,8 @@ def test_end_of_month_mar(self): self.assertEqual(budget_total_count, 12) -class TestReadArchivedBudgetTest: +# failed +class TestReadArchivedBudget: @pytest.fixture(autouse=True) def _setup(self, db): self.archived_figure = [0 for _ in range(16)] @@ -362,7 +363,7 @@ def check_archive_period(self, tested_period): # Check the full total. It is saved in a different table, for convenience monthly_budget = MonthlyTotalBudget.objects.get(archived_period=period) assert self.archived_figure[period] == monthly_budget.amount - # Check that nothig has corrupted the archived figures + # Check that nothing has corrupted the archived figures assert self.archived_figure[period] == self.get_period_budget_total(period) # The following tests check that the archived figures are not changed by diff --git a/end_of_month/test/test_outturn_variance.py b/end_of_month/test/test_outturn_variance.py index a0c5a9b0..610087b3 100644 --- a/end_of_month/test/test_outturn_variance.py +++ b/end_of_month/test/test_outturn_variance.py @@ -6,7 +6,7 @@ from end_of_month.test.test_utils import MonthlyFigureSetup -class TestReadMonthlyVarianceTest: +class TestReadMonthlyVariance: @pytest.fixture(autouse=True) def _setup(self, db): self.archived_figure = [0 for _ in range(16)] diff --git a/future_years/test/test_end_of_month_archive_budget.py b/future_years/test/test_end_of_month_archive_budget.py index 0bef7967..2d7e2e84 100644 --- a/future_years/test/test_end_of_month_archive_budget.py +++ b/future_years/test/test_end_of_month_archive_budget.py @@ -3,16 +3,20 @@ from core.utils.generic_helpers import get_current_financial_year from end_of_month.end_of_month_actions import end_of_month_archive -from end_of_month.test.test_end_of_month_process import TestReadArchivedBudgetTest +from end_of_month.test.test_end_of_month_process import ( + TestReadArchivedBudget as BaseTestReadArchivedBudget, +) from end_of_month.test.test_utils import MonthlyFigureSetup from forecast.models import BudgetMonthlyFigure -class ReadArchivedFutureDataForecast(TestReadArchivedBudgetTest): +# fails +class TestReadArchivedFutureDataForecast(BaseTestReadArchivedBudget): @pytest.fixture(autouse=True) def _setup(self, db): self.archived_figure = [0 for _ in range(16)] self.init_data = MonthlyFigureSetup() + self.init_data.setup_budget() current_year = get_current_financial_year() # Create a set of future budget data self.init_data.set_year(current_year + 2) diff --git a/future_years/test/test_end_of_month_archive_forecast.py b/future_years/test/test_end_of_month_archive_forecast.py index 0cb833a8..fed8f1d1 100644 --- a/future_years/test/test_end_of_month_archive_forecast.py +++ b/future_years/test/test_end_of_month_archive_forecast.py @@ -3,16 +3,19 @@ from core.utils.generic_helpers import get_current_financial_year from end_of_month.end_of_month_actions import end_of_month_archive -from end_of_month.test.test_end_of_month_process import TestReadArchivedForecastTest +from end_of_month.test.test_end_of_month_process import ( + TestReadArchivedForecast as BaseTestReadArchivedForecast, +) from end_of_month.test.test_utils import MonthlyFigureSetup from forecast.models import ForecastMonthlyFigure -class ReadArchivedFutureDataForecast(TestReadArchivedForecastTest): +class TestReadArchivedFutureDataForecast(BaseTestReadArchivedForecast): @pytest.fixture(autouse=True) def _setup(self, db): self.archived_figure = [0 for _ in range(16)] self.init_data = MonthlyFigureSetup() + self.init_data.setup_forecast() current_year = get_current_financial_year() # Create a set of future forecast data self.init_data.set_year(current_year + 2)