'Scenario: User can easy replace the handout by another one w/ preliminary saving
Given I have created a Video component with handout file "asset.html"
And I save changes
Then I can see video button "handout"
And I can download handout file with mime type "text/html"
And I edit the component
And I open tab "Advanced"
And I replace handout file by "textbook.pdf"
And I save changes
Then I can see video button "handout"
And I can download handout file with mime type "application/pdf"'

def test_handout_replace_w_save(self):

    self._create_course_unit_with_handout('asset.html')
    self.assertTrue(self.video.is_handout_button_visible)
    self.assertEqual(self.video.download_handout('text/html'), (True, True))
    self.edit_component()
    self.open_advanced_tab()
    self.video.upload_handout('textbook.pdf')
    self.save_unit_settings()
    self.assertTrue(self.video.is_handout_button_visible)
    self.assertEqual(self.video.download_handout('application/pdf'), (True, True))
