コード例 #1
0
ファイル: postfix_test.py プロジェクト: DaveQB/salt
 def test_set_main(self):
     '''
     Test for set a single config value in the master.cf file
     '''
     with patch.object(postfix, '_parse_main',
                       return_value=({'A': 'a'}, ['b'])):
         with patch.object(postfix, '_write_conf', return_value=None):
             self.assertTrue(postfix.set_main('key', 'value'))
コード例 #2
0
def test_set_main():
    """
    Test for set a single config value in the master.cf file
    """
    with patch.object(postfix, "_parse_main", return_value=({
            "A": "a"
    }, ["b"])):
        with patch.object(postfix, "_write_conf", return_value=None):
            assert postfix.set_main("key", "value")
コード例 #3
0
 def test_set_main(self):
     '''
     Test for set a single config value in the master.cf file
     '''
     with patch.object(postfix,
                       '_parse_main',
                       return_value=({
                           'A': 'a'
                       }, ['b'])):
         with patch.object(postfix, '_write_conf', return_value=None):
             self.assertTrue(postfix.set_main('key', 'value'))