Here are the examples of the python api mock.call.publish_output taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Source : test_generic.py
with GNU Affero General Public License v3.0
from CERT-Polska
with GNU Affero General Public License v3.0
from CERT-Polska
def test__start_publishing(self, LOGGER_mock):
mock = Mock(
__class__=BaseOneShotCollector,
_output_components=[SAMPLE_OUTPUT_COMPONENTS])
# the call
BaseOneShotCollector.start_publishing(mock)
# assertions
self.assertEqual(mock.mock_calls,
[call.publish_output(SAMPLE_OUTPUT_COMPONENTS),
call.inner_stop()])
self.assertIs(mock._output_components, None)
class TestBaseEmailSourceCollector(unittest.TestCase):