Beispiel #1
0
 def test_useradd(self):
     """
     Test if it add HTTP user using the ``htpasswd`` command
     """
     mock = MagicMock(return_value=True)
     with patch.dict(apache.__salt__, {"webutil.useradd": mock}):
         assert apache.useradd("htpasswd", "salt", "badpassword") is True
Beispiel #2
0
 def test_useradd(self):
     '''
     Test if it add HTTP user using the ``htpasswd`` command
     '''
     mock = MagicMock(return_value=True)
     with patch.dict(apache.__salt__, {'webutil.useradd': mock}):
         self.assertTrue(apache.useradd('htpasswd', 'salt', 'badpassword'))
Beispiel #3
0
 def test_useradd(self):
     '''
     Test if it add HTTP user using the ``htpasswd`` command
     '''
     mock = MagicMock(return_value=True)
     with patch.dict(apache.__salt__, {'webutil.useradd': mock}):
         self.assertTrue(apache.useradd('htpasswd', 'salt', 'badpassword'))