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

zopefoundation / zope.contenttype / 20207730323 / 1
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 14 Dec 2025 12:49PM UTC
Files 6
Run time 0s
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

08 Dec 2025 06:52AM UTC coverage: 100.0%. Remained the same
20207730323.1

push

github

web-flow
tests: adjust mime type expectations for .rtf (#22)

The test checks the mime type of .rtf filename. The check is based
on stdlib's `mimetypes.guess_type(name, strict=False)` which in
turn depends on provider of mime types mapping.
CPython's default mapping for rtf:
https://github.com/python/cpython/blob/3.14/Lib/mimetypes.py#L650
https://github.com/python/cpython/blob/3.14/Lib/mimetypes.py#L678-L683

$ python3 -c 'import mimetypes; mimetypes.knownfiles=[]; mimetypes.init(); print(mimetypes.types_map[".rtf"])'
text/rtf

`mimetypes` tries next providers of mime data by default:
$ python3 -c 'import mimetypes; print(mimetypes.knownfiles)'
['/etc/mime.types', '/etc/httpd/mime.types', '/etc/httpd/conf/mime.types', '/etc/apache/mime.types', '/etc/apache2/mime.types', '/usr/local/etc/httpd/conf/mime.types', '/usr/local/lib/netscape/mime.types', '/usr/local/etc/httpd/conf/mime.types', '/usr/local/etc/mime.types']

With installed /etc/mime.types (mailcap):
$ python3 -c 'import mimetypes; mimetypes.init(); print(mimetypes.types_map[".rtf"])'
application/rtf

According to https://www.iana.org/assignments/media-types/media-types.xhtml
both are possible.

Fixes: https://github.com/zopefoundation/zope.contenttype/issues/21

Signed-off-by: Stanislav Levin <slev@altlinux.org>
Co-authored-by: Michael Howitz <icemac@gmx.net>

46 of 46 branches covered (100.0%)

Branch coverage included in aggregate %.

287 of 287 relevant lines covered (100.0%)

1.0 hits per line

Source Files on job 20207730323.1
  • Tree
  • List 6
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 20207730323
  • 52d87432 on github
  • Prev Job for on master (#20003966723.1)
  • Next Job for on master (#20409590249.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