Formatting

This commit is contained in:
2024-10-02 09:41:34 +00:00
parent fa6bc2d5eb
commit 4b77600b09
3 changed files with 32 additions and 12 deletions

1
.gitignore vendored
View File

@@ -1 +1,2 @@
__pycache__/
.pytest_cache/

15
app.py
View File

@@ -13,26 +13,31 @@ version = os.getenv("PYTHON_VERSION")
api = FastAPI()
@api.get("/")
async def root():
return f"This is python version {version} in container {hostname}"
return f"This is python version {version} in container {hostname}"
@api.get("/hello")
async def hello():
return f"Hello {name}!!!"
return f"Hello {name}!!!"
@api.get("/healthz")
async def healthz():
return "OK"
return "OK"
# PyTest section
client = TestClient(api)
def test_healthz():
response = client.get("/")
assert response.status_code == 200
#assert response.json() == {"msg": "OK"}
# assert response.json() == {"msg": "OK"}
def test_hello():
response = client.get("/hello")
assert response.status_code == 200
assert response.status_code == 200

View File

@@ -1,4 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"dependencyDashboard": true,
@@ -11,19 +10,34 @@
},
"packageRules": [
{
"matchDepTypes": ["devDependencies"],
"matchPackagePatterns": ["*"],
"matchUpdateTypes": ["minor","patch"],
"matchDepTypes": [
"devDependencies"
],
"matchPackagePatterns": [
"*"
],
"matchUpdateTypes": [
"minor",
"patch"
],
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch",
"ignoreTests": true,
"automerge": true,
"extends": ["packages:linters"]
"extends": [
"packages:linters"
]
},
{
"description": "Automerge renovate updates",
"matchPackageNames": ["renovatebot/renovate"],
"matchUpdateTypes": ["minor", "patch", "digest"],
"matchPackageNames": [
"renovatebot/renovate"
],
"matchUpdateTypes": [
"minor",
"patch",
"digest"
],
"ignoreTests": true,
"automerge": true
}