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

kobotoolbox / kpi / 17443910075 / 2
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 03 Sep 2025 08:02PM UTC
Files 863
Run time 29s
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

03 Sep 2025 07:24PM UTC coverage: 81.1% (+2.3%) from 78.781%
17443910075.2

push

github

web-flow
feat(dataCollectors): utilities for creating enketo links DEV-798 (#6196)

### 💭 Notes
Developer-only changes. Creates the utils we will use to create the
correct enketo links for data collectors, separated out into its own PR
for easier reviewing. The actual processes that call these utils will be
updated in separate PRs.
We are replacing the default 8-char enketo_ids with longer hashes for
more security around data-collector endpoints since they do not require
login. The new ids are only 31 characters long because 32 characters
causes enketo to 404.

There is a quirk mentioned in
https://chat.kobotoolbox.org/#narrow/stream/4-Kobo-Dev/topic/DEV-798.20creating.20enketo.20links/near/684244
that is not handled in this PR because it didn't seem to affect the
functionality. It should probably be handled so we don't end up with
cruft in redis but I think it can be done separately.

### 👀 Preview steps

1. Open a django shell and a redis-cli
2. In the django shell, run `set_data_collector_enketo_links('token_a',
['uid_0', 'uid_1'])`
3. In redis, run `hget "or:<kobo_url>/key/token_a" "uid_0"` and make
note of the 31-char hash you get back
4. In a browser, navigate to <enketo_url>/x/<hash>
5. 🟢 You should get a response `Request to
http://kf.kobo.local:8080/key/token_a/formList?formID=uid_0 failed.`
This means it generated the correct request, but we haven't set up
authentication yet so we expect it to fail
6. Repeat steps 3-5 with "uid_1" 
7. In the django shell, run
`rename_data_collector_enketo_links('token_a', 'token_b')`
8. Navigate to the same urls you used in enketo earlier (using the 31
char hashes)
9. 🟢 You should get a response `Request to
http://kf.kobo.local:8080/key/token_b/formList?formID=uid_0 failed.`
(note the changed token)
10. In the django shell, run
`remove_data_collector_enketo_links('token_b', ['uid_1'])`
11. Navigate to the enketo url you used for `uid_1`
12. 🟢 You should get a response `Survey with this ID not found` (because
the entr... (continued)

6973 of 10980 branches covered (63.51%)

26685 of 32904 relevant lines covered (81.1%)

0.81 hits per line

Source Files on job 17443910075.2
  • Tree
  • List 863
  • Changed 30
  • Source Changed 0
  • Coverage Changed 30
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 17443910075
  • fda3dbc9 on github
  • Prev Job for on main (#17443594338.1)
  • Next Job for on main (#17457203670.2)
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