Compare commits

..

No commits in common. "595f93cb612b5e3d43150a93704ba9254657ebfd" and "03666c33345d6bc91ac523543be688c043bc3481" have entirely different histories.

5 changed files with 4 additions and 33 deletions

View file

@ -1 +0,0 @@
tests

View file

@ -1,25 +0,0 @@
FROM ghcr.io/astral-sh/uv:python3.11-bookworm
ENV UV_CACHE_DIR=/app/.cache/uv
RUN useradd --shell /bin/bash --uid 1000 transip_client
USER transip_client
WORKDIR /app
RUN mkdir --parents /app/.cache/uv
# only install dependencies
RUN --mount=type=cache,uid=1000,target=/app/.cache/uv \
--mount=type=bind,source=uv.lock,target=/app/uv.lock \
--mount=type=bind,source=pyproject.toml,target=/app/pyproject.toml \
uv sync --frozen --no-install-project
COPY pyproject.toml uv.lock /app
COPY transip_client /app/transip_client
# install dependencies + project
RUN --mount=type=cache,uid=1000,target=/app/.cache/uv uv sync --frozen
ENTRYPOINT ["uv", "run", "--", "transip-listen"]

0
__init__.py Normal file
View file

View file

@ -32,9 +32,6 @@ build-backend = 'setuptools.build_meta'
[tool.uv]
environments = ["sys_platform == 'linux'"]
[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "I"]
[tool.ruff.lint.isort]
lines-between-types=1
lines-after-imports=2

View file

@ -1,9 +1,9 @@
import json
import os
from unittest import TestCase, skip
from unittest.mock import call, patch, Mock
from pathlib import Path
from unittest import TestCase
from unittest.mock import Mock, call, patch
from click.testing import CliRunner
from requests import HTTPError
@ -225,7 +225,7 @@ class RunTestCase(TestCase):
self.assertEqual(result.exit_code, 0)
self.mocked_get.assert_called_with(
"https://other-provider.com/domains/foobar.com/dns",
f"https://other-provider.com/domains/foobar.com/dns",
headers={"Authorization": "Bearer token"},
)
@ -243,7 +243,7 @@ class RunTestCase(TestCase):
)
self.mocked_put.assert_called_with(
"https://other-provider.com/domains/foobar.com/dns",
f"https://other-provider.com/domains/foobar.com/dns",
data=expected_json,
headers={"Authorization": "Bearer token"},
)