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

kobotoolbox / kpi / 14388504636
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-1453-run-external-process
DEFAULT BRANCH: master
Ran 10 Apr 2025 07:52PM UTC
Jobs 2
Files 640
Run time 2min
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 Apr 2025 07:15PM UTC coverage: 80.937% (+0.001%) from 80.936%
14388504636

push

github

web-flow
ci: pytest with stripe disabled (#5650)

### 💭 Notes
Adds a new GitHub action for running tests with Stripe disabled. In
addition to turning off the boolean setting STRIPE_ENABLED, this
settings file removes stripe apps from INSTALLED_APPS so the
models/fields do not end up in the database. This should expose any
instances where code was relying on these models or fields without an
enclosing `if STRIPE_ENABLED` block.

Also uses `pytest.mark.skipif` to toggle tests that specifically require
stripe to be enabled/disabled. This is better than using
@override_settings because that only flips the STRIPE_ENABLED boolean
and does not affect which models are in the database, so it's possible
for bugs of the type mentioned before to slip through. To make this
work, we needed to take some stripe-specific code out of
`test_data.json`. It was only used by a few test suites however, so it
was just a matter of moving the key generation to a mixin.

The workflow file was just straight up copy-pasted with the command
altered to use the non-stripe environment. Just changing
DJANGO_SETTINGS_MODULE in the job env is not enough because it overrides
it with what is in pyproject.toml.

6116 of 9715 branches covered (62.95%)

5 of 18 new or added lines in 3 files covered. (27.78%)

609 existing lines in 18 files now uncovered.

23369 of 28873 relevant lines covered (80.94%)

1.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
59.68
-37.04% kobo/apps/trackers/utils.py
12
20.72
-74.58% kobo/apps/stripe/utils.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
87.5
-1.39% kobo/apps/organizations/admin/organization.py
1
83.33
-5.56% kpi/urls/__init__.py
1
93.62
-2.13% kpi/utils/django_orm_helper.py
2
94.83
-1.15% kobo/apps/mass_emails/tasks.py
3
63.64
-27.27% kobo/apps/accounts/utils.py
3
84.24
-1.82% kobo/apps/organizations/models.py
3
86.67
-10.0% kobo/apps/organizations/utils.py
3
90.52
-2.59% kpi/views/environment.py
4
83.33
-8.33% kobo/apps/accounts/mfa/models.py
8
0.0
-100.0% kobo/apps/stripe/urls.py
19
0.0
-65.52% kobo/apps/stripe/admin.py
22
59.68
-37.04% kobo/apps/trackers/utils.py
25
43.94
-37.88% kobo/apps/mass_emails/user_queries.py
25
70.45
-28.41% kpi/utils/usage_calculator.py
64
0.0
-98.46% kobo/apps/stripe/serializers.py
117
0.0
-91.41% kobo/apps/stripe/models.py
154
20.72
-74.58% kobo/apps/stripe/utils.py
154
0.0
-95.65% kobo/apps/stripe/views.py
Jobs
ID Job ID Ran Files Coverage
1 14388504636.1 10 Apr 2025 07:52PM UTC 640
78.79
2 14388504636.2 10 Apr 2025 07:53PM UTC 640
80.92
Source Files on build 14388504636
  • Tree
  • List 640
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 407d9fe7 on github
  • Prev Build on main (#14386277507)
  • Next Build on main (#14403671905)
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