def test_timeout_in_get_info(self): backend = SoundCloudBackend( 'https://soundcloud.com/community/soundcloud-case-study-wildlife') self.assertRaises(requests.Timeout, backend.get_info)
def test_invalid_url(self): """ Check if bug #21 is fixed. """ backend = SoundCloudBackend('https://soundcloud.com/xyz/foo') self.assertRaises(VideoDoesntExistException, backend.get_info)
def test_embed_get_params_soundcloud_height(self): url = 'https://soundcloud.com/glassnote/mumford-sons-i-will-wait' backend = SoundCloudBackend(url) params = _embed_get_params(backend, (1, 2)) self.assertEqual(backend.height, params['height'])