Exemple #1
0
 def test__publisher(self):
     mock_publish = mock.MagicMock()
     mock_is_published = mock.MagicMock()
     queue = collections.deque()
     broker._publisher(mock_publish, queue, mock_is_published)
     mock_publish.assert_called_once_with(queue)
     mock_is_published.set.assert_called_once_with()
Exemple #2
0
 def test__publisher(self):
     mock_publish = mock.MagicMock()
     mock_is_published = mock.MagicMock()
     queue = collections.deque()
     broker._publisher(mock_publish, queue, mock_is_published)
     mock_publish.assert_called_once_with(queue)
     mock_is_published.set.assert_called_once_with()
Exemple #3
0
 def test__publisher_fails(self):
     mock_publish = mock.MagicMock(side_effect=Exception())
     mock_is_published = mock.MagicMock()
     queue = collections.deque()
     broker._publisher(mock_publish, queue, mock_is_published)
     mock_is_published.set.assert_called_once_with()
Exemple #4
0
 def test__publisher_fails(self):
     mock_publish = mock.MagicMock(side_effect=Exception())
     queue = collections.deque()
     broker._publisher(mock_publish, queue)
Exemple #5
0
 def test__publisher_fails(self):
     mock_publish = mock.MagicMock(side_effect=Exception())
     mock_is_published = mock.MagicMock()
     queue = collections.deque()
     broker._publisher(mock_publish, queue, mock_is_published)
     mock_is_published.set.assert_called_once_with()
Exemple #6
0
 def test__publisher_fails(self):
     mock_publish = mock.MagicMock(side_effect=Exception())
     queue = collections.deque()
     broker._publisher(mock_publish, queue)