Skip to content

Commit 6081551

Browse files
author
Gabriel Monroy
committed
cleanup any old logfiles re #101
1 parent f26e859 commit 6081551

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

api/tests/formation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ def test_formation_actions(self):
136136
if not os.path.exists(settings.DEIS_LOG_DIR):
137137
os.mkdir(settings.DEIS_LOG_DIR)
138138
path = os.path.join(settings.DEIS_LOG_DIR, formation_id + '.log')
139+
try:
140+
os.remove(path) # cleanup any old log files
141+
except:
142+
pass
139143
url = '/api/formations/{formation_id}/logs'.format(**locals())
140144
response = self.client.post(url)
141145
self.assertEqual(response.status_code, 404)

0 commit comments

Comments
 (0)