|
5 | 5 | from django.core.checks import Warning
|
6 | 6 | from django.core.exceptions import ValidationError
|
7 | 7 | from django.db import IntegrityError, connection, transaction
|
8 |
| -from django.test import RequestFactory |
9 | 8 | from django.test.utils import CaptureQueriesContext, isolate_apps, override_settings
|
10 | 9 | from django.urls import reverse
|
11 | 10 | from pytest_django.asserts import assertContains, assertRedirects
|
12 | 11 |
|
13 | 12 | from feincms3 import mixins
|
14 | 13 | from feincms3.pages import AbstractPage
|
15 |
| -from feincms3.shortcuts import render_list |
16 |
| -from testapp.models import Article, Page |
| 14 | +from testapp.models import Page |
17 | 15 |
|
18 | 16 |
|
19 | 17 | def zero_management_form_data(prefix):
|
@@ -698,23 +696,6 @@ def test_get_absolute_url():
|
698 | 696 | assert Page(path="/").get_absolute_url() == "/"
|
699 | 697 |
|
700 | 698 |
|
701 |
| -@pytest.mark.django_db |
702 |
| -def test_render_list(): |
703 |
| - """render_list, automatic template selection and pagination""" |
704 |
| - for i in range(7): |
705 |
| - Article.objects.create(title=f"Article {i}", category="publications") |
706 |
| - |
707 |
| - request = RequestFactory().get("/", data={"page": 2}) |
708 |
| - response = render_list( |
709 |
| - request, list(Article.objects.all()), model=Article, paginate_by=2 |
710 |
| - ) |
711 |
| - |
712 |
| - assert response.template_name == "testapp/article_list.html" |
713 |
| - assert len(response.context_data["object_list"]) == 2 |
714 |
| - assert response.context_data["object_list"].number == 2 |
715 |
| - assert response.context_data["object_list"].paginator.num_pages == 4 |
716 |
| - |
717 |
| - |
718 | 699 | @isolate_apps("testapp")
|
719 | 700 | def test_page_with_missing_ordering():
|
720 | 701 | """Page subclass without ordering doesn't check out"""
|
|
0 commit comments