예제 #1
0
class TestSphinxRouter(SphinxModelTestCaseBase):
    def setUp(self):
        super().setUp()
        self.router = SphinxRouter()

    def testSphinxModelDetection(self):
        self.assertTrue(self.router.is_sphinx_model(models.TestModel))

        self.assertTrue(self.router.is_sphinx_model(models.TestModel()))

        self.assertTrue(
            self.router.is_sphinx_model(models.OverridenSphinxModel))

        self.assertTrue(
            self.router.is_sphinx_model(models.OverridenSphinxModel()))

        self.assertFalse(self.router.is_sphinx_model(
            models.DefaultDjangoModel))

        self.assertFalse(
            self.router.is_sphinx_model(models.DefaultDjangoModel()))
예제 #2
0
class TestSphinxRouter(SphinxModelTestCaseBase):
    def setUp(self):
        super(TestSphinxRouter, self).setUp()
        self.router = SphinxRouter()

    def testSphinxModelDetection(self):
        self.assertTrue(self.router.is_sphinx_model(
            models.TestModel))

        self.assertTrue(self.router.is_sphinx_model(
            models.TestModel()))

        self.assertTrue(self.router.is_sphinx_model(
            models.OverridenSphinxModel))

        self.assertTrue(self.router.is_sphinx_model(
            models.OverridenSphinxModel()))

        self.assertFalse(self.router.is_sphinx_model(
            models.DefaultDjangoModel))

        self.assertFalse(self.router.is_sphinx_model(
            models.DefaultDjangoModel()))
예제 #3
0
 def setUp(self):
     super().setUp()
     self.router = SphinxRouter()
예제 #4
0
 def setUp(self):
     super(TestSphinxRouter, self).setUp()
     self.router = SphinxRouter()
예제 #5
0
 def setUp(self):
     super(TestSphinxRouter, self).setUp()
     self.router = SphinxRouter()