Skip to content

Fix TemplateDoesNotExist errors in Cost_CentreView#26

Merged
gb119 merged 2 commits into
mainfrom
copilot/fix-failing-pytest-tests
Mar 3, 2026
Merged

Fix TemplateDoesNotExist errors in Cost_CentreView#26
gb119 merged 2 commits into
mainfrom
copilot/fix-failing-pytest-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 3, 2026

Two tests in TestCostingsViews were failing with TemplateDoesNotExist because Cost_CentreView referenced misspelled template names (cost_cntre instead of cost_centre).

Change

  • apps/costings/views.py: Corrected typo in two class-level template name attributes:
# Before (broken)
template_name_full_description  = "costings/parts/cost_cntre_description_full.html"
template_name_short_description = "costings/parts/cost_cntre_description_short.html"

# After (fixed)
template_name_full_description  = "costings/parts/cost_centre_description_full.html"
template_name_short_description = "costings/parts/cost_centre_description_short.html"

The actual template files (cost_centre_description_full.html, cost_centre_description_short.html) already exist with the correct spelling.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…names

Co-authored-by: gb119 <4428426+gb119@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing tests in recent pytest run Fix TemplateDoesNotExist errors in Cost_CentreView Mar 3, 2026
Copilot finished work on behalf of gb119 March 3, 2026 22:36
@codacy-production
Copy link
Copy Markdown

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.03% (target: -1.00%) 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (42d4b1a) 5797 4177 72.05%
Head commit (61d9c5e) 5797 (+0) 4179 (+2) 72.09% (+0.03%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#26) 2 2 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@gb119 gb119 marked this pull request as ready for review March 3, 2026 22:40
@gb119 gb119 merged commit 133a24e into main Mar 3, 2026
4 checks passed
@gb119 gb119 deleted the copilot/fix-failing-pytest-tests branch March 3, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants