[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#756766: Initial work-patch on this bug



Hi,

On Wed, 02 Sep 2015, Orestis Ioannou wrote:
> I have enabled only the unstable repository and I don't have many news
> to test what i ve done. Is there any other solution to test/work this
> besides adding more repositories?

s/repositories/news/ ?

If you want to test this, you have to add many news to a single package.
You can do that manually I guess (either in an interactive Python shell
or with the help of "./manage.py tracker_receive_news"), or better, you
script it.

And then you reuse that code for functional testing with selenium (cf
functional_tests/tests.py).

> I attach the initial patch although there still work to be done (avoid
> copy pasting pagination code, add some tests, redirection from the old
> PTS)

There's possibly also room for simplication by using generic views like
django.views.generic.list.ListView, they support pagination natively...

You should also avoid duplication between templates and factorize
the HTML code to display the list of news.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/


Reply to: