  
          self.assertEqual(alice.username, 'alice')
          self.assertEqual(alice._state.db, 'other')
  
          self.assertRaises(User.DoesNotExist, User.objects.using('default').get, username='alice')
  
          # The second user only exists on the default database
          bob = User.objects.using('default').get(username='bob')
  
          self.assertEqual(bob.username, 'bob')
 
</s> remove         self.assertRaises(User.DoesNotExist, User.objects.using('other').get, username='bob')
 </s> add         with self.assertRaises(User.DoesNotExist):
            User.objects.using('other').get(username='bob') </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.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(FieldError, test_gmbh.save)
 </s> add         with self.assertRaises(FieldError):
            test_gmbh.save() </s> remove             self.assertRaises(Director.DoesNotExist, lambda: private_school.director)
 </s> add             with self.assertRaises(Director.DoesNotExist):
                private_school.director
        with self.assertRaises(User.DoesNotExist):
            User.objects.using('default').get(username='alice')
  
          self.assertEqual(alice.username, 'alice')
          self.assertEqual(alice._state.db, 'other')
  
        with self.assertRaises(User.DoesNotExist):
            User.objects.using('default').get(username='alice')
  
          # The second user only exists on the default database
          bob = User.objects.using('default').get(username='bob')
  
          self.assertEqual(bob.username, 'bob')
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/multiple_database/tests.py