Exemplo n.º 1
0
 def test_categories(self):
     """
     :func:`otter.indexer.categories` finds all categories if no pattern
     is given
     """
     self.assertEqual(categories(self.simple_entry),
                      ['REGION=dfw', 'DATACENTER=dfw1'])
Exemplo n.º 2
0
 def test_categories_with_pattern(self):
     """
     :func:`otter.indexer.categories` finds categories that match a
     particular pattern only, if pattern is given
     """
     self.assertEqual(categories(self.simple_entry, 'REGION='),
                      ['REGION=dfw'])
Exemplo n.º 3
0
 def test_categories(self):
     """
     :func:`otter.indexer.categories` finds all categories if no pattern
     is given
     """
     self.assertEqual(
         categories(self.simple_entry),
         ['REGION=dfw', 'DATACENTER=dfw1']
     )
Exemplo n.º 4
0
 def test_categories_with_pattern(self):
     """
     :func:`otter.indexer.categories` finds categories that match a
     particular pattern only, if pattern is given
     """
     self.assertEqual(
         categories(self.simple_entry, 'REGION='),
         ['REGION=dfw']
     )