              # Make it an absolute url (but schemeless and domainless) for the
              # edge case that the path starts with '//'.
              location = '//%s' % self.get_full_path()
          bits = urlsplit(location)
          if not (bits.scheme and bits.netloc):
              # Handle the simple, most common case. If the location is absolute
              # and a scheme or host (netloc) isn't provided, skip an expensive
              # urljoin() as long as no path segments are '.' or '..'.
 
</s> remove from django.test import SimpleTestCase, TestCase, override_settings
 </s> add from django.test import (
    RequestFactory, SimpleTestCase, TestCase, override_settings,
)
        else:
            # Coerce lazy locations.
            location = str(location)
              # Make it an absolute url (but schemeless and domainless) for the
              # edge case that the path starts with '//'.
              location = '//%s' % self.get_full_path()
        else:
            # Coerce lazy locations.
            location = str(location)
          bits = urlsplit(location)
          if not (bits.scheme and bits.netloc):
              # Handle the simple, most common case. If the location is absolute
              # and a scheme or host (netloc) isn't provided, skip an expensive
              # urljoin() as long as no path segments are '.' or '..'.
keep keep add keep keep keep keep keep
 Fixed #31114 -- Fixed HttpRequest.build_absolute_uri() crash with reverse_lazy() locations. 
django/http/request.py