Beispiel #1
0
def test_owner():
    """
    Test - Return the name of the package that owns the file.
    """
    paths = ["/usr/bin/wget"]
    mock = MagicMock(return_value="wget: /usr/bin/wget")
    with patch.dict(aptpkg.__salt__, {"cmd.run_stdout": mock}):
        assert aptpkg.owner(*paths) == "wget"
Beispiel #2
0
 def test_owner(self):
     '''
     Test - Return the name of the package that owns the file.
     '''
     paths = ['/usr/bin/wget']
     mock = MagicMock(return_value='wget: /usr/bin/wget')
     with patch.dict(aptpkg.__salt__, {'cmd.run_stdout': mock}):
         self.assertEqual(aptpkg.owner(*paths), 'wget')
Beispiel #3
0
 def test_owner(self):
     '''
     Test - Return the name of the package that owns the file.
     '''
     paths = ['/usr/bin/wget']
     mock = MagicMock(return_value='wget: /usr/bin/wget')
     with patch.dict(aptpkg.__salt__, {'cmd.run_stdout': mock}):
         self.assertEqual(aptpkg.owner(*paths), 'wget')
Beispiel #4
0
 def test_owner(self):
     '''
     Test - Return the name of the package that owns the file.
     '''
     assert aptpkg.owner('/usr/bin/wget') == 'wget'