예제 #1
0
 def test_remove_last_slash(self):
     """Check that the last slash in an url is correctly removed."""
     self.assertEqual(remove_last_slash('https://github.com/'),
                      'https://github.com')
     self.assertEqual(remove_last_slash('https://github.com/hello'),
                      'https://github.com/hello')
     self.assertEqual(remove_last_slash('https://github.com/hello/'),
                      'https://github.com/hello')
예제 #2
0
 def __init__(self, lang, voice, url, api_path):
     super(RemoteTTS, self).__init__(lang, voice)
     self.api_path = api_path
     self.url = remove_last_slash(url)
     self.session = FuturesSession()
예제 #3
0
 def __init__(self, lang, voice, url, api_path, validator):
     super(RemoteTTS, self).__init__(lang, voice, validator)
     self.api_path = api_path
     self.url = remove_last_slash(url)
     self.session = FuturesSession()
예제 #4
0
 def __init__(self, lang, config, url, api_path, validator):
     super(RemoteTTS, self).__init__(lang, config, validator)
     self.api_path = api_path
     self.auth = None
     self.url = remove_last_slash(url)
     self.session = FuturesSession()