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

ministryofjustice / cla_backend / 22213
82%

Build:
DEFAULT BRANCH: master
Ran 10 Jan 2024 03:14PM UTC
Jobs 1
Files 246
Run time 16s
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

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

Jobs
ID Job ID Ran Files Coverage
1 22213.1 10 Jan 2024 03:14PM UTC 0
81.84
CircleCI Job
Source Files on build 22213
Detailed source file information is not available for this build.
  • Back to Repo
  • CircleCI Build #22213
  • 47884b3b on github
  • Prev Build on master (#21562)
  • Next Build on master (#22330)
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