@@ -301,7 +301,8 @@ def test_view_downloadSubmission(self):
301301 text = f .read ()
302302 for var in ((u'{{submissionDate}}' ,
303303 instance .date_created .isoformat ()),
304- (u'{{form_id}}' , str (self .xform .id ))):
304+ (u'{{form_id}}' , str (self .xform .id )),
305+ (u'{{media_id}}' , str (self .attachment .id ))):
305306 text = text .replace (* var )
306307 self .assertContains (response , instanceId , status_code = 200 )
307308 self .assertMultiLineEqual (response .content .decode ('utf-8' ), text )
@@ -466,7 +467,8 @@ def test_view_downloadSubmission_no_xmlns(self, mock_get_object):
466467 text = f .read ()
467468 for var in ((u'{{submissionDate}}' ,
468469 instance .date_created .isoformat ()),
469- (u'{{form_id}}' , str (self .xform .id ))):
470+ (u'{{form_id}}' , str (self .xform .id )),
471+ (u'{{media_id}}' , str (self .attachment .id ))):
470472 text = text .replace (* var )
471473 self .assertNotIn (
472474 'transportation id="transportation_2011_07_25"'
@@ -521,7 +523,8 @@ def test_view_downloadSubmission_multiple_nodes(self, mock_get_object):
521523 text = f .read ()
522524 for var in ((u'{{submissionDate}}' ,
523525 instance .date_created .isoformat ()),
524- (u'{{form_id}}' , str (self .xform .id ))):
526+ (u'{{form_id}}' , str (self .xform .id )),
527+ (u'{{media_id}}' , str (self .attachment .id ))):
525528 text = text .replace (* var )
526529 self .assertContains (response , instanceId , status_code = 200 )
527530
0 commit comments