  
          first_two = Author.objects.raw(query)[0:2]
          self.assertEqual(len(first_two), 2)
  
          self.assertRaises(TypeError, lambda: Author.objects.raw(query)['test'])
  
      def test_inheritance(self):
          # date is the end of the Cuban Missile Crisis, I have no idea when
          # Wesley was born
          f = FriendlyAuthor.objects.create(first_name="Wesley", last_name="Chun",
 
</s> remove             self.assertRaises(AttributeError, getattr, settings, 'TEST2')
 </s> add             with self.assertRaises(AttributeError):
                getattr(settings, 'TEST2') </s> remove         self.assertRaises(ContentNotRenderedError, lambda: response.content)
 </s> add         with self.assertRaises(ContentNotRenderedError):
            response.content </s> remove         self.assertRaises(InvalidPage, paginator.page, 3)
        self.assertRaises(PageNotAnInteger, paginator.validate_number, None)
        self.assertRaises(PageNotAnInteger, paginator.validate_number, 'x')
 </s> add         with self.assertRaises(InvalidPage):
            paginator.page(3)
        with self.assertRaises(PageNotAnInteger):
            paginator.validate_number(None)
        with self.assertRaises(PageNotAnInteger):
            paginator.validate_number('x') </s> remove         self.assertRaises(TypeError, qs.kml, 'name')
 </s> add         with self.assertRaises(TypeError):
            qs.kml('name') </s> remove         self.assertRaises(forms.ValidationError, f.clean, '13:30:05 21.12.2010')
 </s> add         with self.assertRaises(forms.ValidationError):
            f.clean('13:30:05 21.12.2010')
        with self.assertRaises(TypeError):
            Author.objects.raw(query)['test']
  
          first_two = Author.objects.raw(query)[0:2]
          self.assertEqual(len(first_two), 2)
  
        with self.assertRaises(TypeError):
            Author.objects.raw(query)['test']
  
      def test_inheritance(self):
          # date is the end of the Cuban Missile Crisis, I have no idea when
          # Wesley was born
          f = FriendlyAuthor.objects.create(first_name="Wesley", last_name="Chun",
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/raw_query/tests.py