Compare commits

..

7 Commits

Author SHA1 Message Date
0b45367424 Update dependency flask-migrate to v3.1.0
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-28 12:35:54 +00:00
9ff56f6676 Merge pull request 'Update dependency yapf to v0.40.2' (!94) from renovate/yapf-0.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #94
2024-08-28 13:46:17 +02:00
2412df4960
Apply yapf and add ignorefile
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-28 13:43:33 +02:00
469ef511d6 Merge pull request 'Add .python-version file' (!105) from pyenv into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #105
2024-08-28 13:19:28 +02:00
47d2c94b79
Specify license for .python-version
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-28 12:57:31 +02:00
384dd82454 Update dependency yapf to v0.40.2
All checks were successful
continuous-integration/drone/pr Build is passing
2024-08-27 17:38:01 +00:00
b0dcfacd25
Add .python-version file
Some checks failed
continuous-integration/drone/pr Build is failing
2024-08-27 19:08:52 +02:00
11 changed files with 46 additions and 9 deletions

1
.python-version Normal file
View File

@ -0,0 +1 @@
3.8.19

View File

@ -11,6 +11,6 @@ Files: Pipfile.lock migrations/*
Copyright: WTF Kooperative eG <https://wtf-eg.de/>
License: AGPL-3.0-or-later
Files: renovate.json
Files: renovate.json .python-version
Copyright: WTF Kooperative eG <https://wtf-eg.de/>
License: AGPL-3.0-or-later

5
.yapfignore Normal file
View File

@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: WTF Kooperative eG <https://wtf-eg.de/>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
migrations/*.py

View File

@ -22,7 +22,7 @@ werkzeug = "==2.3.8"
[dev-packages]
flake8 = "==3.9.2"
yapf = "==0.31.0"
yapf = "==0.40.2"
pre-commit = "==2.13.0"
reuse = "==0.14.0"

39
Pipfile.lock generated
View File

@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "6d3d845993189a875534ee97fe2a5eb6e0f606242aa31760974c1138a845bf3a"
"sha256": "1e13c8a0f567fd61ad33fd8f3d6ff8544d13952872aa5a274a278ad251352f6e"
},
"pipfile-spec": 6,
"requires": {
@ -602,6 +602,14 @@
"markers": "python_version >= '3.6'",
"version": "==3.8"
},
"importlib-metadata": {
"hashes": [
"sha256:66f342cc6ac9818fc6ff340576acd24d65ba0b3efabb2b4ac08b598965a4a2f1",
"sha256:9a547d3bc3608b025f93d403fdd1aae741c24fbb8314df4b155675742ce303c5"
],
"markers": "python_version < '3.9'",
"version": "==8.4.0"
},
"jinja2": {
"hashes": [
"sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369",
@ -820,11 +828,11 @@
},
"setuptools": {
"hashes": [
"sha256:b208925fcb9f7af924ed2dc04708ea89791e24bde0d3020b27df0e116088b34e",
"sha256:d59a3e788ab7e012ab2c4baed1b376da6366883ee20d7a5fc426816e3d7b1193"
"sha256:0274581a0037b638b9fc1c6883cc71c0210865aaa76073f7882376b641b84e8f",
"sha256:a85e96b8be2b906f3e3e789adec6a9323abf79758ecfa3065bd740d81158b11e"
],
"markers": "python_version >= '3.8'",
"version": "==73.0.1"
"version": "==74.0.0"
},
"toml": {
"hashes": [
@ -834,6 +842,14 @@
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
"version": "==0.10.2"
},
"tomli": {
"hashes": [
"sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc",
"sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"
],
"markers": "python_version >= '3.7'",
"version": "==2.0.1"
},
"urllib3": {
"hashes": [
"sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472",
@ -852,11 +868,20 @@
},
"yapf": {
"hashes": [
"sha256:408fb9a2b254c302f49db83c59f9aa0b4b0fd0ec25be3a5c51181327922ff63d",
"sha256:e3a234ba8455fe201eaa649cdac872d590089a18b661e39bbac7020978dd9c2e"
"sha256:4dab8a5ed7134e26d57c1647c7483afb3f136878b579062b786c9ba16b94637b",
"sha256:adc8b5dd02c0143108878c499284205adb258aad6db6634e5b869e7ee2bd548b"
],
"index": "pypi",
"version": "==0.31.0"
"markers": "python_version >= '3.7'",
"version": "==0.40.2"
},
"zipp": {
"hashes": [
"sha256:9960cd8967c8f85a56f920d5d507274e74f9ff813a0ab8889a5b5be2daf44064",
"sha256:c22b14cc4763c5a5b04134207736c107db42e9d3ef2d9779d465f5f1bcba572b"
],
"markers": "python_version >= '3.8'",
"version": "==3.20.1"
}
}
}

View File

@ -17,6 +17,7 @@ content_type_png = "image/png"
def token_auth(func):
@wraps(func)
def _token_auth(*args, **kwargs):
auth_header = request.headers.get("Authorization")

View File

@ -8,6 +8,7 @@ from ki.test.ApiTest import ApiTest
class TestContactTypesEndpoint(ApiTest):
def test_skills_options(self):
response = self.client.options("/contacttypes")
self.assertEqual(response.status_code, 200)

View File

@ -8,6 +8,7 @@ from ki.test.ApiTest import ApiTest
class TestFindProfilesEndpoint(ApiTest):
def test_find_profiles_options(self):
response = self.client.options("/users/profiles")
self.assertEqual(response.status_code, 200)

View File

@ -8,6 +8,7 @@ from ki.test.ApiTest import ApiTest
class TestLanguagesEndpoint(ApiTest):
def test_skills_options(self):
response = self.client.options("/languages")
self.assertEqual(response.status_code, 200)

View File

@ -10,6 +10,7 @@ from ki.test.ApiTest import ApiTest
class TestLoginEndpoint(ApiTest):
def test_login(self):
response1_data = self.login("peter", "geheim")
response2_data = self.login("peter", "geheim")

View File

@ -8,6 +8,7 @@ from ki.test.ApiTest import ApiTest
class TestSkillsEndpoint(ApiTest):
def test_skills_options(self):
response = self.client.options("/skills")
self.assertEqual(response.status_code, 200)