示例#1
0
 def test_add(self):
     '''
     Tests to add the specified group
     '''
     mock = MagicMock(return_value={'retcode': 0})
     with patch.dict(pw_group.__salt__, {'cmd.run_all': mock}):
         self.assertTrue(pw_group.add('a'))
def test_add():
    """
    Tests to add the specified group
    """
    mock = MagicMock(return_value={"retcode": 0})
    with patch.dict(pw_group.__salt__, {"cmd.run_all": mock}):
        assert pw_group.add("a")
示例#3
0
 def test_add(self):
     '''
     Tests to add the specified group
     '''
     mock = MagicMock(return_value={'retcode': 0})
     with patch.dict(pw_group.__salt__, {'cmd.run_all': mock}):
         self.assertTrue(pw_group.add('a'))