'Test image url is set to None if no video image.'

@override_switch(VIDEO_IMAGE_UPLOAD_ENABLED, True)
def test_no_video_image(self):

    edx_video_id = 'test1'
    get_videos_url = reverse_course_url('videos_handler', self.course.id)
    video_image_upload_url = self.get_url_for_course_key(self.course.id, {'edx_video_id': edx_video_id})
    with make_image_file(dimensions=(settings.VIDEO_IMAGE_MIN_WIDTH, settings.VIDEO_IMAGE_MIN_HEIGHT)) as image_file:
        self.client.post(video_image_upload_url, {'file': image_file}, format='multipart')
    val_image_url = get_course_video_image_url(course_id=self.course.id, edx_video_id=edx_video_id)
    response = self.client.get_json(get_videos_url)
    self.assertEqual(response.status_code, 200)
    response_videos = json.loads(response.content)['videos']
    for response_video in response_videos:
        if (response_video['edx_video_id'] == edx_video_id):
            self.assertEqual(response_video['course_video_image_url'], val_image_url)
        else:
            self.assertEqual(response_video['course_video_image_url'], None)
