HTTPretty
HTTPretty copied to clipboard
tests/unit/test_core.py:test_fakesock_socket_sendall_with_body_data_with_{chunked_,}entry fail.
Running 'tox -epy27' works very well.
Acitvating the py27 environment ('source .tox/py27/bin/activate) and running 'nosetests' works.
Testing only test_fakesock_socket_sendall_with_body_data_with_entry fail: http://paste.debian.net/77714/ . We get the same kind of error with test_fakesock_socket_sendall_with_body_data_with_chunked_entry.
So, many issues here:
- Make sure the tests are reproducible (if possible). Here, the output of these tests clearly depends on the fact that other tests ran before. Fixing this might end up making the test suite slower to run, but this is not a problem:
"A program that produces incorrect results twice as fast is infinitely slower."
— John Osterhout
- Understand what's happening in fakesock.socket.sendall() (httpretty/core.py):
- what do we expect "path" to be when a ValueError is raised at the beginning of the method ?
- is "data.split()" supposed to raise a ValueError, or is it just parse_requestline() ?
- in the tests, should we call sendall without headers, as is done in the failing tests ?
Gabriel, you could definitely help with the second one, since you wrote the code in the first place.
I don't consider this issue blocking for 0.8, but it'd be nice if we could fix it by then.