Join Nostr
2024-10-21 12:29:43 UTC

Marijke Luttekes on Nostr: I just posted this question in the testing channel of the Django Discord, but for ...

I just posted this question in the testing channel of the Django Discord, but for those who are not there:

Does anyone know if you can test if the output of the `{% url %}` template tag is an empty string?

I already have `FAIL_INVALID_TEMPLATE_VARS` enabled in `pytest-django` (which activate Django core's `string_if_invalid`).

While this feature fails tests when template variables are missing, it does nothing for variables with empty values.

#Django