• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ministryofjustice / cla_backend / 22213 / 1
82%
master: 82%

Build:
DEFAULT BRANCH: master
Ran 10 Jan 2024 03:14PM UTC
Files 246
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Jan 2024 03:08PM UTC coverage: 81.838% (+0.001%) from 81.837%
22213.1

push

circleci

davidread
is_eligible() returns yes/no/unknown

is_eligible() returns ELIGIBILITY_STATES - "yes"/"no"/"unknown" instead of True/False/PropertyExpectedException

The reason is that the CFE checker will not naturally raise an exception to signal "unknown" ("not_calculated_yet" in CFE language).

And exceptions that travel several calls up are difficult for new developers to understand, especially when used for expected behaviour on the happy path (rather than an error). You can see why it was used in the past, when the calculation accessed data that was not present, but when the calculation is in CFE this is no longer possible without artificially raising the exception. And there is no need.

To fit with this change to the is_eligible() return, the callers have been adjusted:

* is_eligible() is called from apps/legalaid/models.py::EligibilityCheck.get_eligibility_state() when eligibility checks are done from cla_public or cla_frontend
* is_eligible() is also called during some tests with DEBUG=1 from means_test_api

In addition, legacy_check() and _do_cfe_civil_check() return ELIGIBILITY_STATES too, so the results can be easily compared.

7453 of 9107 relevant lines covered (81.84%)

0.82 hits per line

Source Files on job 22213.1
  • Tree
  • List 0
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 22213
  • CircleCI Build #
  • 47884b3b on github
  • Prev Job for on master (#21562.1)
  • Next Job for on master (#22330.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc