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 bde05d9 commit 971d638
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 27 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: true

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -46,20 +45,6 @@ jobs:
- name: Run black
run: make black-check

- name: Run tests
run: make pytest
- name: Run tests
run: make pytest
- name: Run tests
run: make pytest
- name: Run tests
run: make pytest
- name: Run tests
run: make pytest
- name: Run tests
run: make pytest
- name: Run tests
run: make pytest
- name: Run tests
run: make pytest

Expand Down
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 @@ -112,13 +112,7 @@ def test_end_of_month_mar(self):
self.assertEqual(count, 129)


class TestReadArchivedForecast:
@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()

class ReadArchivedForecastTestMixin:
def get_period_total(self, period):
data_model = forecast_budget_view_model[period]
tot_q = data_model.objects.filter(
Expand Down Expand Up @@ -222,6 +216,14 @@ def test_read_archived_figure_mar(self):
self.check_archive_period(tested_period)


class TestReadArchivedForecast(ReadArchivedForecastTestMixin):
@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()


class EndOfMonthBudgetTest(TestCase):
def setUp(self):
self.init_data = MonthlyFigureSetup()
Expand Down Expand Up @@ -333,7 +335,6 @@ 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)
print(period, data_model, self.init_data.year_used, tot_q, tot_q[0].budget)
return tot_q[0].budget

def get_current_budget_total(self):
Expand Down
6 changes: 2 additions & 4 deletions future_years/test/test_end_of_month_archive_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +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 (
TestReadArchivedForecast as BaseTestReadArchivedForecast,
)
from end_of_month.test.test_end_of_month_process import ReadArchivedForecastTestMixin
from end_of_month.test.test_utils import MonthlyFigureSetup
from forecast.models import ForecastMonthlyFigure


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

0 comments on commit 971d638

Please sign in to comment.