[Qa-debsources] [PATCH] Add test for index news, bug #783461
Orestis Ioannou
orestis at oioannou.com
Mon Mar 21 09:52:42 UTC 2016
Hey,
On 03/21/2016 07:50 AM, Aaron Delaney wrote:
>
> This is my first time committing a patch (on any software that isn't on
> Github)
> so I might do stuff wrong. That being said I won't take criticism
> personally.
>
No worries :)
> In order to avoid overwriting news, and also avoiding having to modify code
> outside the tests, I chose to save the text data as a class attribute.
>
> There are other ways to do it but they're more complex, or involve globals.
> Let me know if this way is too hacky.
>
Another solution would be to create the news (using what the function
you created) when you need them inside the test. You do have access to
the config there as well and so you would only need to save it in a
variable only for that particular test.
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/20160321/8185a701/attachment.sig>
More information about the Qa-debsources
mailing list