Private
Public Access
1
0

fixed file open/close omission

This commit is contained in:
Sander Roosendaal
2021-12-15 19:56:06 +01:00
parent 8fea558b7f
commit 459a6a0ba4
2 changed files with 4 additions and 2 deletions

View File

@@ -1598,7 +1598,9 @@ class InstantPlan(models.Model):
return self.name
def save(self, *args, **kwargs):
self.yaml.open(mode="r")
yamltext = self.yaml.read()
self.yaml.close()
authorizationstring = 'Bearer '+settings.WORKOUTS_FIT_TOKEN
url = settings.WORKOUTS_FIT_URL+"/trainingplan/"

View File

@@ -156,7 +156,7 @@ class CoursesTest(TestCase):
response = self.c.post('/rowers/courses/upload/', form_data, follow=True)
self.assertRedirects(response, expected_url='/rowers/list-courses/',
status_code=302,target_status_code=200)
@@ -191,7 +191,7 @@ class CoursesTest(TestCase):
response = self.c.get('/rowers/courses/1/downloadkml/')
self.assertEqual(response.status_code,200)
self.assertEquals(
self.assertEqual(
response.get('Content-Disposition'),
'attachment; filename="course_1.kml"'
)