fixed file open/close omission
This commit is contained in:
@@ -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/"
|
||||
|
||||
@@ -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"'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user