'A router can choose to implement a subset of methods'

def test_partial_router(self):

    dive = Book.objects.using(u'other').create(title=u'Dive    into    Python', published=datetime.date(2009, 5, 4))
    self.assertEqual(router.db_for_read(User), u'other')
    self.assertEqual(router.db_for_read(Book), u'other')
    self.assertEqual(router.db_for_write(User), u'default')
    self.assertEqual(router.db_for_write(Book), u'default')
    self.assertTrue(router.allow_relation(dive, dive))
    self.assertTrue(router.allow_syncdb(u'default', User))
    self.assertTrue(router.allow_syncdb(u'default', Book))
    router.routers = [WriteRouter(), AuthRouter(), TestRouter()]
    self.assertEqual(router.db_for_read(User), u'default')
    self.assertEqual(router.db_for_read(Book), u'other')
    self.assertEqual(router.db_for_write(User), u'writer')
    self.assertEqual(router.db_for_write(Book), u'writer')
    self.assertTrue(router.allow_relation(dive, dive))
    self.assertFalse(router.allow_syncdb(u'default', User))
    self.assertTrue(router.allow_syncdb(u'default', Book))
