From 4a1ed42375df8c44ece10aa56cd630c04619b194 Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Mon, 16 Sep 2024 11:13:36 +0200 Subject: [PATCH] Fix publishing. --- Makefile | 10 +++++----- tests/main/test_http.py | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 675a0fa..159d388 100644 --- a/Makefile +++ b/Makefile @@ -36,13 +36,13 @@ test: types safetest: export SKIP_TRUE_REDIS=1; export SKIP_TRUE_HTTP=1; make test -publish: install-test-requirements - python -m build --sdist . - twine upload --repository mocket dist/mocket-$(shell python -c 'import mocket; print(mocket.__version__)').tar.gz +publish: clean install-test-requirements + uv run python3 -m build --sdist . + uv run twine upload --repository mocket dist/*.tar.gz clean: - rm -rf *.egg-info dist/ requirements.txt Pipfile.lock - find . -type d -name __pycache__ -exec rm -rf {} \; + rm -rf *.egg-info dist/ requirements.txt Pipfile.lock || true + find . -type d -name __pycache__ -exec rm -rf {} \; || true .PHONY: clean publish safetest test setup develop lint-python test-python _services-up .PHONY: prepare-hosts services-up services-down install-test-requirements install-dev-requirements diff --git a/tests/main/test_http.py b/tests/main/test_http.py index d335bcc..2732410 100644 --- a/tests/main/test_http.py +++ b/tests/main/test_http.py @@ -271,8 +271,7 @@ def test_file_object_with_no_lib_magic(self): self.assertEqual(remote_content, local_content) self.assertEqual(len(remote_content), len(local_content)) self.assertEqual(int(r.headers["Content-Length"]), len(local_content)) - with self.assertRaises(KeyError): - self.assertEqual(r.headers["Content-Type"], "image/png") + self.assertNotIn("Content-Type", r.headers) @mocketize def test_same_url_different_methods(self):