'Test successful uploads of relative and direct links,
both types of media'

def test_media_successful_uploads(self):

    self._create_set()
    self._update_json('event', 'background_image', '/bg.png')
    self._create_file('bg.png')
    self._update_json('speakers', 'photo', '/spkr.png', 1)
    self._create_file('spkr.png')
    self._update_json('sponsors', 'logo', 'http://google.com/favicon.ico', 1)
    data = self._make_zip_from_dir()
    event_dic = self._do_succesful_import(data)
    resp = self.app.get(event_dic['background_image'])
    self.assertEqual(resp.status_code, 200)
    photo = self._get_event_value(get_path(2, 'speakers', 2), 'photo')
    resp = self.app.get(photo)
    self.assertEqual(resp.status_code, 200)
    self.assertIn('http://', photo)
    logo = self._get_event_value(get_path(2, 'sponsors', 2), 'logo')
    self.assertIn('sponsors', logo)
    self.assertNotEqual(logo, 'http://google.com/favicon.ico')
    resp = self.app.get(logo)
    self.assertEqual(resp.status_code, 200)
