Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures on 1.5.1 #1405

Closed
domenkozar opened this issue Aug 25, 2014 · 10 comments
Closed

Test failures on 1.5.1 #1405

domenkozar opened this issue Aug 25, 2014 · 10 comments
Milestone

Comments

@domenkozar
Copy link
Member

======================================================================
FAIL: test_without_content_type (pyramid.tests.test_response.TestFileResponse)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python3.3-pyramid-1.5.1.drv-2/pyramid-1.5.1/pyramid/tests/test_response.py", line 61, in test_without_content_type
    self.assertEqual(r.content_type, content_type.split(';')[0])
AssertionError: 'text/xml' != 'application/xml'
- text/xml
+ application/xml
@tseaver
Copy link
Member

tseaver commented Aug 25, 2014

What OS? That test passes for me on Ubuntu 12.04.

@tseaver
Copy link
Member

tseaver commented Aug 25, 2014

May be a difference in the '/etc/mimetypes' on your system vs. mine::

$ mimetype pyramid/tests/fixtures/minimal.xml
pyramid/tests/fixtures/minimal.xml: application/xml

@domenkozar
Copy link
Member Author

NixOS. Where do I get the mimetype command?

@tseaver
Copy link
Member

tseaver commented Aug 25, 2014

I don't know from NixOS. On Precise::

$ dpkg-query --search /usr/bin/mimetype 
libfile-mimeinfo-perl: /usr/bin/mimetype

@mmerickel
Copy link
Member

FWIW duplicate of #1389.

@mmerickel
Copy link
Member

We may just want to patch mimetypes for the purposes of that test to avoid system configuration issues.

@tseaver
Copy link
Member

tseaver commented Aug 25, 2014

We could change the test to assert that the return value matches the result from ' mimetypes.guess_type(url, strict=False)'.

@lmacken
Copy link

lmacken commented Aug 28, 2014

This test fails for me on Fedora. mimetype pyramid/tests/fixtures/minimal.xml says application/xml but mimetypes.guess_type returns text/xml.

@mmerickel
Copy link
Member

+1 on just checking the return type against mimetypes.guess_type as @tseaver suggested. I don't think we're interested in going any further into requiring a specific mimetype than what the library says.

@domenkozar
Copy link
Member Author

I've submitted a PR #1446

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants