[Qa-debsources] [PATCH] Add test for index news, bug #783461
Orestis Ioannou
orestis at oioannou.com
Tue Mar 22 08:48:16 UTC 2016
Hey,
A comment below
On 03/22/2016 08:47 AM, Aaron Delaney wrote:
> I decided to ditch the function because it seemed more appropriate
> to just keep everything in the one function now that it was handling
> all news tests.
>
> I've attached the file again, is that unnecessary or is it helpful to
> you?
>
> + def test_news(self):
> + # news_routes = { news_filename: associated_route }
> + news_routes = {
> + 'sources_news.html': '/',
> + 'copyright_news.html': '/copyright/',
> + 'patches_news.html': '/patches/'
> + }
> + # Go through each news_route and ensure it contains the data we expect
> + # which is the data in local/news.html file.
> + # If data doesn't exist, create dummy data to test.
While I do like the idea, IMHO i think it is better to keep tests for
sources blueprint in webapp, tests for the copyright one in web_cp etc.
So i liked better your take with having a function in
DebsourcesBaseWebTests from where the webapp test cases inherit. Then
you just need to fetch the news and test.
But maybe Matthieu has another take on this so probably wait for his
input as well :)
Cheers,
Orestis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/qa-debsources/attachments/20160322/2942a5eb/attachment.sig>
More information about the Qa-debsources
mailing list