              'title': 'The electric kool-aid acid test',
              'author': 'Tom Wolfe'
          }
          serializer = self.BookSerializer(data=data, many=True)
          self.assertEqual(serializer.is_valid(), False)
  
          expected_errors = {'non_field_errors': ['Expected a list of items but got type "dict".']}
  
          self.assertEqual(serializer.errors, expected_errors)
 
</s> remove         self.assertEqual(serializer.errors, expected_errors)
 </s> add         assert serializer.errors == expected_errors </s> remove         self.assertEqual(serializer.errors, expected_errors)
 </s> add         assert serializer.errors == expected_errors
        assert serializer.is_valid() is False
              'title': 'The electric kool-aid acid test',
              'author': 'Tom Wolfe'
          }
          serializer = self.BookSerializer(data=data, many=True)
        assert serializer.is_valid() is False
  
          expected_errors = {'non_field_errors': ['Expected a list of items but got type "dict".']}
  
          self.assertEqual(serializer.errors, expected_errors)
keep keep keep keep replace keep keep keep keep
 converted serializer bulk update test asserts to pytest (#4805) 
tests/test_serializer_bulk_update.py