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)
def test_list_pkgs_removed(self): ''' Tests removed implementation ''' self.assertEqual(mac_brew.list_pkgs(removed=True), {})