コード例 #1
0
 def test_list_pkgs_versions_true(self):
     '''
     Tests if pkg.list_pkgs is already in context and is a list
     '''
     mock_context = {'foo': ['bar']}
     with patch.dict(mac_brew.__context__, {'pkg.list_pkgs': mock_context}):
         self.assertEqual(mac_brew.list_pkgs(versions_as_list=True),
                          mock_context)
コード例 #2
0
ファイル: mac_brew_test.py プロジェクト: bryson/salt
 def test_list_pkgs_versions_true(self):
     '''
     Tests if pkg.list_pkgs is already in context and is a list
     '''
     mock_context = {'foo': ['bar']}
     with patch.dict(mac_brew.__context__, {'pkg.list_pkgs': mock_context}):
         self.assertEqual(mac_brew.list_pkgs(versions_as_list=True),
                          mock_context)
コード例 #3
0
 def test_list_pkgs_removed(self):
     '''
     Tests removed implementation
     '''
     self.assertEqual(mac_brew.list_pkgs(removed=True), {})
コード例 #4
0
ファイル: mac_brew_test.py プロジェクト: bryson/salt
 def test_list_pkgs_removed(self):
     '''
     Tests removed implementation
     '''
     self.assertEqual(mac_brew.list_pkgs(removed=True), {})