From 094f6d2d541741e6558a9b86ccf49298c0edfd2c Mon Sep 17 00:00:00 2001 From: dedenbangkit Date: Tue, 28 Jun 2022 23:52:31 +0700 Subject: [PATCH] [#523] Remove generated config after test --- backend/api/v1/v1_profile/tests/test_config_js.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/api/v1/v1_profile/tests/test_config_js.py b/backend/api/v1/v1_profile/tests/test_config_js.py index 01754f989..141708054 100644 --- a/backend/api/v1/v1_profile/tests/test_config_js.py +++ b/backend/api/v1/v1_profile/tests/test_config_js.py @@ -12,7 +12,9 @@ class ConfigJS(TestCase): def test_config_generation(self): administration_seeder.seed_administration_prod() - os.remove(config_path) + if Path(config_path).exists(): + os.remove(config_path) self.assertFalse(Path(config_path).exists()) self.client.get("/api/v1/config.js", follow=True) self.assertTrue(Path(config_path).exists()) + os.remove(config_path)