diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ build: .PHONY: dev-env ## make dev-env based on the requirements files and install develop of packages dev-env: - pip install build virtualenv pipdeptree + pip install build virtualenv pip wheel --wheel-dir=/home/rhodecode/.cache/pip/wheels -r requirements.txt -r requirements_test.txt -r requirements_debug.txt pip install --no-index --find-links=/home/rhodecode/.cache/pip/wheels -r requirements.txt -r requirements_test.txt -r requirements_debug.txt pip install -e . diff --git a/requirements_debug.txt b/requirements_debug.txt --- a/requirements_debug.txt +++ b/requirements_debug.txt @@ -1,12 +1,22 @@ ## special libraries we could extend the requirements.txt file with to add some -## custom libraries useful for debug and memory tracing - -## uncomment inclusion of this file in requirements.txt run make generate-pkgs and nix-shell +## custom libraries usefull for debug and memory tracing objgraph memory-profiler pympler + +## debug ipdb ipython +rich + +# format flake8 -rich +ruff + +pipdeptree==2.7.1 +invoke==2.0.0 +bumpversion==0.6.0 +bump2version==1.0.1 + +docutils-stubs diff --git a/vcsserver/tests/test_hooks.py b/vcsserver/tests/test_hooks.py --- a/vcsserver/tests/test_hooks.py +++ b/vcsserver/tests/test_hooks.py @@ -164,7 +164,7 @@ class TestHooksHttpClient(object): 'method': hook_name, 'extras': extras, }) - assert hooks_proto == {'rc-hooks-protocol': 'msgpack.v1'} + assert hooks_proto == {'rc-hooks-protocol': 'msgpack.v1', 'Connection': 'keep-alive'} assert result == expected_result def test_call_queries_http_server(self, http_mirror): @@ -259,7 +259,7 @@ def test_hooks_http_client_call(): extras = {'key': 'value'} with \ - mock.patch('vcsserver.hooks.HTTPConnection') as mock_connection,\ + mock.patch('http.client.HTTPConnection') as mock_connection,\ mock.patch('msgpack.load') as mock_load: client = HooksHttpClient(hooks_uri) @@ -282,5 +282,5 @@ def test_hooks_http_client_serialize(): extras = {'key': 'value'} headers, body = HooksHttpClient._serialize(method, extras) - assert headers == {'rc-hooks-protocol': HooksHttpClient.proto} + assert headers == {'rc-hooks-protocol': HooksHttpClient.proto, 'Connection': 'keep-alive'} assert msgpack.unpackb(body) == {'method': method, 'extras': extras}