Fix 'unclosed file' warnings in tests

see https://github.com/pallets/flask/issues/2468#issuecomment-517797518
This commit is contained in:
Brain 2024-09-13 14:02:54 +02:00
parent 2ff958c55f
commit 60c906cb5c
Signed by: Brain
GPG Key ID: EE936E31EE3AEE7A
2 changed files with 3 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class TestLanguagesEndpoint(ApiTest):
self.assertEqual(response.status_code, 200)
self.assertIn("Content-Type", response.headers)
self.assertEqual(response.headers["Content-Type"], "image/svg+xml; charset=utf-8")
response.close()
if __name__ == "main":

View File

@ -41,12 +41,14 @@ class TestSkillsEndpoint(ApiTest):
self.assertEqual(response.status_code, 200)
self.assertIn("Content-Type", response.headers)
self.assertEqual(response.headers["Content-Type"], "image/svg+xml; charset=utf-8")
response.close()
def test_get_fallback_skill_icon(self):
response = self.client.get("/skills/2/icon")
self.assertEqual(response.status_code, 200)
self.assertIn("Content-Type", response.headers)
self.assertEqual(response.headers["Content-Type"], "image/svg+xml; charset=utf-8")
response.close()
if __name__ == "main":