

def test_whitespace_in_path(self):
    path = '/a path/containing spaces/'
    request = self.factory.get(path)
    next = models.PageList(request, self.paginator.page(self.current_number), self.page_label).next()
    self.assertEqual((path.replace(' ', '%20') + next.url), next.path)

dataset/ETHPy150Open frankban/django-endless-pagination/endless_pagination/tests/test_models.py PageListTest.test_whitespace_in_path/original