Пример #1
0
class BookListViewTestCase(RequestFactoryTests):
    c = Client()
    url = "/books/"
    filter_params = [
        "title__icontains",
        "publication_lang",
        "author",
        "from_date",
        "to_date",
    ]

    def setUp(self):
        super().setUp()
        self.view = BookList()
        self.view.setup(self.req)

    def test_context_object_name_books(self):
        self.assertIn("books", self.view.context_object_name)