Пример #1
0
def test_show_queue():
    """
    Test for show contents of the mail queue
    """
    with patch.dict(postfix.__salt__,
                    {"cmd.run": MagicMock(return_value="A\nB")}):
        assert postfix.show_queue() == []

    # Test if get an extra newline in the output
    with patch.dict(postfix.__salt__,
                    {"cmd.run": MagicMock(return_value="A\nB\n")}):
        assert postfix.show_queue() == []
Пример #2
0
 def test_show_queue(self):
     '''
     Test for show contents of the mail queue
     '''
     with patch.dict(postfix.__salt__,
                     {'cmd.run': MagicMock(return_value='A\nB')}):
         self.assertEqual(postfix.show_queue(), [])
Пример #3
0
 def test_show_queue(self):
     '''
     Test for show contents of the mail queue
     '''
     with patch.dict(postfix.__salt__, {'cmd.run':
                                        MagicMock(return_value='A\nB')}):
         self.assertEqual(postfix.show_queue(), [])
Пример #4
0
 def test_show_queue(self):
     """
     Test for show contents of the mail queue
     """
     with patch.dict(postfix.__salt__,
                     {"cmd.run": MagicMock(return_value="A\nB")}):
         self.assertEqual(postfix.show_queue(), [])