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() == []
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(), [])
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(), [])