Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ types:
test: types
@echo "Running Python tests"
uv pip uninstall pook || true
export VIRTUAL_ENV=.venv; .venv/bin/wait-for-it --service httpbin.local:443 --service localhost:6379 --timeout 5 -- .venv/bin/pytest
.venv/bin/wait-for-it --service httpbin.local:443 --service localhost:6379 --timeout 5 -- .venv/bin/pytest
uv pip install pook && .venv/bin/pytest tests/test_pook.py && uv pip uninstall pook
@echo ""

safetest:
export SKIP_TRUE_REDIS=1; export SKIP_TRUE_HTTP=1; make test
export SKIP_TRUE_REDIS=1; export SKIP_TRUE_HTTP=1; .venv/bin/pytest

publish: clean install-test-requirements
uv run python3 -m build --sdist --wheel .
Expand Down
1 change: 1 addition & 0 deletions tests/test_mocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ def test_patch(


@pytest.mark.skipif(not psutil.POSIX, reason="Uses a POSIX-only API to test")
@pytest.mark.skipif('os.getenv("SKIP_TRUE_HTTP", False)')
@pytest.mark.asyncio
async def test_no_dangling_fds():
url = "http://httpbin.local/ip"
Expand Down
4 changes: 3 additions & 1 deletion tests/test_redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,11 @@ def setUp(self):
self.rclient = redis.StrictRedis()

def mocketize_setup(self):
Entry.register_response("CLIENT SETINFO LIB-NAME redis-py", OK)
Entry.register_response(f"CLIENT SETINFO LIB-VER {redis.__version__}", OK)
Entry.register_response("FLUSHDB", OK)
self.rclient.flushdb()
self.assertEqual(len(Mocket.request_list()), 1)
self.assertEqual(len(Mocket.request_list()), 3)
Mocket.reset()

@mocketize
Expand Down