Skip to content

Commit 7f61abb

Browse files
committed
test(stt): refactor tests when operation is locked
1 parent 88e2c08 commit 7f61abb

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test/integration/test_speech_to_text_v1.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,13 @@ def test_custom_grammars(self):
142142
assert get_grammar_result is not None
143143
else:
144144
print('Deleting grammar')
145-
delete_grammar_result = self.speech_to_text.delete_grammar(
146-
customization_id,
147-
'test-add-grammar-python'
148-
).get_result()
149-
assert delete_grammar_result is not None
145+
try:
146+
delete_grammar_result = self.speech_to_text.delete_grammar(
147+
customization_id,
148+
'test-add-grammar-python'
149+
).get_result()
150+
except ibm_watson.ApiException as ex:
151+
print('Could not delete grammar: {0}'.format(ex.message))
150152

151153
try:
152154
self.speech_to_text.delete_language_model(customization_id)

0 commit comments

Comments
 (0)