'Scenario: Video is rendered in HTML5 mode when the YouTube API is blocked
Given the YouTube server response time is greater than 1.5 seconds
And the YouTube API is blocked
And the course has a Video component in "Youtube_HTML5" mode
Then the video has rendered in "HTML5" mode
And only one video has rendered'

def test_video_with_youtube_blocked_delayed_response_time(self):

    self.youtube_configuration.update({'time_to_response': 2.0, 'youtube_api_blocked': True})
    self.metadata = self.metadata_for_mode('youtube_html5')
    self.navigate_to_video()
    self.assertTrue(self.video.is_video_rendered('html5'))
    self.assertEqual(len(self.video.q(css='video')), 1)
