|
@@ -104,26 +104,25 @@ class TestNeurotransmitter(unittest.TestCase):
|
|
|
nt = Neurotransmitter(**parameters)
|
|
|
mock_get_audio_from_stt.assert_called_once()
|
|
|
mock_get_audio_from_stt.reset_mock()
|
|
|
+
|
|
|
|
|
|
audio_text = None
|
|
|
nt.callback(audio=audio_text)
|
|
|
mock_run_synapse_by_name.assert_called_once_with(self.default)
|
|
|
mock_run_synapse_by_name.reset_mock()
|
|
|
+
|
|
|
|
|
|
audio_text = "try test audio "
|
|
|
nt.callback(audio=audio_text)
|
|
|
mock_run_synapse_by_name.assert_called_once_with(self.default)
|
|
|
mock_run_synapse_by_name.reset_mock()
|
|
|
|
|
|
- with mock.patch.object(NeuronModule,
|
|
|
- 'run_synapse_by_name_with_order',
|
|
|
- create=True) as mock_run_synapse_by_name_with_order:
|
|
|
-
|
|
|
- audio_text="answer one"
|
|
|
- nt.callback(audio=audio_text)
|
|
|
- mock_run_synapse_by_name_with_order.assert_called_once_with(order=audio_text,
|
|
|
- synapse_name="synapse2",
|
|
|
- order_template="answer one")
|
|
|
+
|
|
|
+ audio_text="answer one"
|
|
|
+ nt.callback(audio=audio_text)
|
|
|
+ mock_run_synapse_by_name.assert_called_once_with(order=audio_text,
|
|
|
+ synapse_name="synapse2",
|
|
|
+ order_template="answer one")
|
|
|
|
|
|
def testInit(self):
|
|
|
"""
|