From 60c906cb5cbeeb6c5ecd44b188460bdcc57f8e39 Mon Sep 17 00:00:00 2001 From: Brain Date: Fri, 13 Sep 2024 14:02:54 +0200 Subject: [PATCH] Fix 'unclosed file' warnings in tests see https://github.com/pallets/flask/issues/2468#issuecomment-517797518 --- ki/test/test_languages_endpoint.py | 1 + ki/test/test_skills_endpoint.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ki/test/test_languages_endpoint.py b/ki/test/test_languages_endpoint.py index c872ba8..7982ba5 100644 --- a/ki/test/test_languages_endpoint.py +++ b/ki/test/test_languages_endpoint.py @@ -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": diff --git a/ki/test/test_skills_endpoint.py b/ki/test/test_skills_endpoint.py index 60acf21..01dd117 100644 --- a/ki/test/test_skills_endpoint.py +++ b/ki/test/test_skills_endpoint.py @@ -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":