              Book.objects.using('default').get(title="Pro Django")
          except Book.DoesNotExist:
              self.fail('"Pro Django" should exist on default database')
  
          self.assertRaises(
              Book.DoesNotExist,
              Book.objects.using('other').get,
              title="Pro Django"
          )
  
          try:
              Book.objects.get(title="Dive into Python")
              Book.objects.using('default').get(title="Dive into Python")
          except Book.DoesNotExist:
 
</s> remove         self.assertRaises(
            Book.DoesNotExist,
            Book.objects.get,
            title="Pro Django"
        )
        self.assertRaises(
            Book.DoesNotExist,
            Book.objects.using('default').get,
            title="Pro Django"
        )
 </s> add         with self.assertRaises(Book.DoesNotExist):
            Book.objects.get(title="Pro Django")
        with self.assertRaises(Book.DoesNotExist):
            Book.objects.using('default').get(title="Pro Django") </s> remove         self.assertRaises(
            Book.DoesNotExist,
            Book.objects.using('other').get,
            title="Pro Django"
        )
 </s> add         with self.assertRaises(Book.DoesNotExist):
            Book.objects.using('other').get(title="Pro Django") </s> remove         self.assertRaises(
            Book.DoesNotExist,
            Book.objects.get,
            title="Dive into Python"
        )
        self.assertRaises(
            Book.DoesNotExist,
            Book.objects.using('default').get,
            title="Dive into Python"
        )
 </s> add         with self.assertRaises(Book.DoesNotExist):
            Book.objects.get(title="Dive into Python")
        with self.assertRaises(Book.DoesNotExist):
            Book.objects.using('default').get(title="Dive into Python") </s> remove         self.assertRaises(
            Book.DoesNotExist,
            Book.objects.using('other').get,
            title="Dive into Python"
        )
 </s> add         with self.assertRaises(Book.DoesNotExist):
            Book.objects.using('other').get(title="Dive into Python") </s> remove         self.assertRaises(
            Book.DoesNotExist,
            Book.objects.get,
            title="Dive into Python"
        )
        self.assertRaises(
            Book.DoesNotExist,
            Book.objects.using('default').get,
            title="Dive into Python"
        )
 </s> add         with self.assertRaises(Book.DoesNotExist):
            Book.objects.get(title="Dive into Python")
        with self.assertRaises(Book.DoesNotExist):
            Book.objects.using('default').get(title="Dive into Python")
        with self.assertRaises(Book.DoesNotExist):
            Book.objects.using('other').get(title="Pro Django")
              Book.objects.using('default').get(title="Pro Django")
          except Book.DoesNotExist:
              self.fail('"Pro Django" should exist on default database')
  
        with self.assertRaises(Book.DoesNotExist):
            Book.objects.using('other').get(title="Pro Django")
        with self.assertRaises(Book.DoesNotExist):
            Book.objects.using('other').get(title="Pro Django")
        with self.assertRaises(Book.DoesNotExist):
            Book.objects.using('other').get(title="Pro Django")
        with self.assertRaises(Book.DoesNotExist):
            Book.objects.using('other').get(title="Pro Django")
        with self.assertRaises(Book.DoesNotExist):
            Book.objects.using('other').get(title="Pro Django")
  
          try:
              Book.objects.get(title="Dive into Python")
              Book.objects.using('default').get(title="Dive into Python")
          except Book.DoesNotExist:
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/multiple_database/tests.py