Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
SamDudley committed Mar 26, 2024
1 parent 77e63fb commit bde05d9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
17 changes: 9 additions & 8 deletions end_of_month/test/test_end_of_month_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,7 @@ def test_end_of_month_mar(self):
self.assertEqual(budget_total_count, 12)


# failed
class TestReadArchivedBudget:
@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()

class ReadArchivedBudgetTestMixin:
def get_period_budget_total(self, period):
data_model = forecast_budget_view_model[period]
tot_q = data_model.objects.filter(financial_year=self.init_data.year_used)
Expand Down Expand Up @@ -426,3 +419,11 @@ def test_read_archived_figure_mar(self):
tested_period = 12
self.test_read_archived_figure_feb()
self.check_archive_period(tested_period)


class TestReadArchivedBudget(ReadArchivedBudgetTestMixin):
@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()
7 changes: 2 additions & 5 deletions future_years/test/test_end_of_month_archive_budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@

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 (
TestReadArchivedBudget as BaseTestReadArchivedBudget,
)
from end_of_month.test.test_end_of_month_process import ReadArchivedBudgetTestMixin
from end_of_month.test.test_utils import MonthlyFigureSetup
from forecast.models import BudgetMonthlyFigure


# fails
class TestReadArchivedFutureDataForecast(BaseTestReadArchivedBudget):
class TestReadArchivedFutureDataForecast(ReadArchivedBudgetTestMixin):
@pytest.fixture(autouse=True)
def _setup(self, db):
self.archived_figure = [0 for _ in range(16)]
Expand Down

0 comments on commit bde05d9

Please sign in to comment.