Formatting
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
__pycache__/
|
||||
.pytest_cache/
|
||||
|
||||
15
app.py
15
app.py
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user