Example #1
0
 def test_configured_connections_without_titles(self):
     settings = {
         'HAYSTACK_CONNECTIONS': {
             'default': {},
             'neato': {}
         }
     }
     with self.settings(**settings):
         titled = frozenset(get_haystack_connections())
         self.assertEqual(titled, frozenset([
             ('default', 'Default'),
             ('neato', 'Neato')
         ]))
Example #2
0
 def test_configured_connections_with_titles(self):
     settings = {
         'HAYSTACK_CONNECTIONS': {
             'default': {
                 'TITLE': 'OHMYGLOB',
             },
             'neato': {
                 'TITLE': 'xyz',
             }
         }
     }
     with self.settings(**settings):
         titled = frozenset(get_haystack_connections())
         self.assertEqual(titled, frozenset([
             ('default', 'OHMYGLOB'),
             ('neato', 'xyz')
         ]))