From d9d7917dd8fb7d74d046fea325bd41890bfcec86 Mon Sep 17 00:00:00 2001 From: dandds Date: Tue, 9 Oct 2018 10:28:19 -0400 Subject: [PATCH] ignore dev routes for tests coverage and add placeholders for reports --- .coveragerc | 2 ++ tests/domain/test_reports.py | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..0e05aa16 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,2 @@ +[run] +omit = atst/routes/dev.py diff --git a/tests/domain/test_reports.py b/tests/domain/test_reports.py index dcb0bfa8..1aa832ea 100644 --- a/tests/domain/test_reports.py +++ b/tests/domain/test_reports.py @@ -16,3 +16,23 @@ def test_workspace_totals(): report = Reports.workspace_totals(workspace) total = 200 * len(CLIN_NUMS) assert report == {"budget": total, "spent": 0} + + +# this is sketched in until we do real reporting +def test_monthly_totals(): + request = RequestFactory.create() + workspace = WorkspaceFactory.create(request=request) + monthly = Reports.monthly_totals(workspace) + + assert not monthly["environments"] + assert not monthly["projects"] + assert not monthly["workspace"] + + +# this is sketched in until we do real reporting +def test_cumulative_budget(): + request = RequestFactory.create() + workspace = WorkspaceFactory.create(request=request) + months = Reports.cumulative_budget(workspace) + + assert len(months["months"]) == 12