crate-python icon indicating copy to clipboard operation
crate-python copied to clipboard

Refactor tests that might be unnecessary

Open surister opened this issue 2 months ago • 2 comments

in test_http.py, for example tests that use: https://github.com/crate/crate-python/blob/371e12576f508d1250b267690237e07779c3c935/tests/client/test_http.py#L563 Do not seem to be very useful, we setup an HTTP server that parses things from the headers and puts the parsed stuff to a dictionary, then we check that that dictionary has what we expected.

Why are we testing this on a threaded HTTP server, we could literally just get the headers from a request and check that it's what we'd expect, without any overhead of setting up a thread and an http server. Other tests that also start an http server have the same issue, we could test the exact same thing without all of this machinery.

surister avatar Oct 24 '25 11:10 surister