Fixes path issue in test
The test path wasn't setup to work properly in travis.
@@ -128,10 +128,11 @@ def test_custom_corpora():
speech_to_text.list_corpora(customization_id='customid')
- file_path = './resources/speech_to_text/corpus-short-1.txt'
- with open(file_path) as f:
+ file_path = '../resources/speech_to_text/corpus-short-1.txt'
+ full_path = os.path.join(os.path.dirname(__file__), file_path)
+ with open(full_path) as corpus_file:
speech_to_text.add_corpora(customization_id='customid',
- corpus_name="corpus",file=f)
+ corpus_name="corpus",file=corpus_file)
speech_to_text.get_corpus(customization_id='customid',
corpus_name='corpus')
