Skip to content

Commit

Permalink
chore: fix win test and default language warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mrf345 committed Jul 4, 2024
1 parent cbb246a commit 1c07df9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions flask_gtts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ def inject(self):
def inject_vars():
return dict(sayit=self.say, read=self.read)

def say(self, lang='en-us', text='Flask says Hi!'):
def say(self, lang='en', text='Flask says Hi!'):
'''Generate a TTS audio file.
Parameters
----------
lang : str, optional
Language to produce the TTS in, by default 'en-us'
Language to produce the TTS in, by default 'en'
text : str, optional
Text to convert into audio, by default 'Flask says Hi!'
Expand Down
2 changes: 1 addition & 1 deletion tests/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_template_sayit_file_exists(client):
''' test validity of mp3 file from template sayit '''
extension.files = {}
resp = client.get('/say')
static_file_relative = resp.data[1:].decode('utf-8')
static_file_relative = resp.data[1:].decode('utf-8').split('%5C')[-1]
static_file_path = os.path.join(extension.tempdir,
os.path.basename(static_file_relative))

Expand Down
2 changes: 1 addition & 1 deletion tests/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def wrapper(*args, **kwargs):
route_decorator=prevent_header,
failsafe=True)
text = 'something to say'
language = 'en-uk'
language = 'en'


@app.route('/say')
Expand Down

0 comments on commit 1c07df9

Please sign in to comment.