f6bacd3fde
The NovaProxyRequestHandlerTestCase.test_tcp_rst_no_compute_rpcapi test fails with mock==4.0.2 because mock is calling the NovaProxyRequestHandler class's compute_rpcapi @property while creating mock autospecs. The test asserts that the @property is not called when a TCP RST is received, so mock calling the @property itself causes the test to fail erroneously. This is also the case in the built-in unittest.mock in python 3.8 [1]. We can refactor (and rename) this unit test to more concisely test the desired behavior when TCP RST or otherwise unvalidated requests are handled by the console proxy request handler. This has the benefit of (1) making the test work with mock==4.0.2 and python 3.8 and (2) removing unnecessary dependency and potentially incorrect assumptions about the internal details of websockify. Closes-Bug: #1887735 [1] https://bugs.python.org/issue41768 Change-Id: I58b0382c86d4ef798572edb63d311e0e3e6937bb |
||
---|---|---|
.. | ||
rfb | ||
securityproxy | ||
__init__.py | ||
test_serial.py | ||
test_type.py | ||
test_websocketproxy.py |