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()))
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()))
def setUp(self): super().setUp() self.router = SphinxRouter()
def setUp(self): super(TestSphinxRouter, self).setUp() self.router = SphinxRouter()