File: tests.py

package info (click to toggle)
django-haystack 3.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,504 kB
  • sloc: python: 23,475; xml: 1,708; sh: 74; makefile: 71
file content (13 lines) | stat: -rw-r--r-- 346 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
from django.test import TestCase

from .models import MicroBlogPost


class AppConfigTests(TestCase):
    def test_index_collection(self):
        from haystack import connections

        unified_index = connections["default"].get_unified_index()
        models = unified_index.get_indexed_models()

        self.assertIn(MicroBlogPost, models)