|
@@ -108,13 +108,13 @@ class TestNeurotransmitter(unittest.TestCase):
|
|
|
|
|
|
audio_text = None
|
|
|
nt.callback(audio=audio_text)
|
|
|
- mock_run_synapse_by_name.assert_called_once_with(self.default)
|
|
|
+ mock_run_synapse_by_name.assert_called_once_with(self.default, high_priority=True, is_api_call=False)
|
|
|
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.assert_called_once_with(self.default, high_priority=True, is_api_call=False)
|
|
|
mock_run_synapse_by_name.reset_mock()
|
|
|
|
|
|
|
|
@@ -122,7 +122,9 @@ class TestNeurotransmitter(unittest.TestCase):
|
|
|
nt.callback(audio=audio_text)
|
|
|
mock_run_synapse_by_name.assert_called_once_with(synapse_name="synapse2",
|
|
|
user_order=audio_text,
|
|
|
- synapse_order="answer one")
|
|
|
+ synapse_order="answer one",
|
|
|
+ high_priority=True,
|
|
|
+ is_api_call=False)
|
|
|
|
|
|
def testInit(self):
|
|
|
"""
|
|
@@ -136,7 +138,7 @@ class TestNeurotransmitter(unittest.TestCase):
|
|
|
"direct_link": self.direct_link
|
|
|
}
|
|
|
Neurotransmitter(**parameters)
|
|
|
- mock_run_synapse_by_name.assert_called_once_with(self.direct_link)
|
|
|
+ mock_run_synapse_by_name.assert_called_once_with(self.direct_link, high_priority=True)
|
|
|
|
|
|
with mock.patch("kalliope.core.NeuronModule.get_audio_from_stt") as mock_get_audio_from_stt:
|
|
|
|
|
@@ -146,3 +148,7 @@ class TestNeurotransmitter(unittest.TestCase):
|
|
|
}
|
|
|
Neurotransmitter(**parameters)
|
|
|
mock_get_audio_from_stt.assert_called_once()
|
|
|
+
|
|
|
+
|
|
|
+if __name__ == '__main__':
|
|
|
+ unittest.main()
|