On Fri, 2009-08-07 at 09:19 +0000, Gavin Panella wrote:
> Have a look at using lp.testing.factory.LaunchpadObjectFactory. You can use this to quickly create, say, branches, so that there are code artifacts for your user. That will probably be enough to test this code.
I don't think so. That list of categories is generated based on the kind
of karma the person has on the KarmaCache table, and that table is
populated by a script. Even though the person would get karma when
factory.makeBranch() is called, it wouldn't end up in the KarmaCache
table until we ran the script. We could run the script in the test, but
that'd make the test *a lot* slower.
That's why I suggested a new method on LPObjectFactory to create the
KarmaCache entries directly.
Jamal, I remember you were able to write the new factory method, so you
should be quite close to getting a test for your fix. If you need any
help, just drop by #launchpad-reviewers and I'll help you.
On Fri, 2009-08-07 at 09:19 +0000, Gavin Panella wrote: factory. LaunchpadObject Factory. You can use this to quickly create, say, branches, so that there are code artifacts for your user. That will probably be enough to test this code.
> Have a look at using lp.testing.
I don't think so. That list of categories is generated based on the kind makeBranch( ) is called, it wouldn't end up in the KarmaCache
of karma the person has on the KarmaCache table, and that table is
populated by a script. Even though the person would get karma when
factory.
table until we ran the script. We could run the script in the test, but
that'd make the test *a lot* slower.
That's why I suggested a new method on LPObjectFactory to create the
KarmaCache entries directly.
Jamal, I remember you were able to write the new factory method, so you reviewers and I'll help you.
should be quite close to getting a test for your fix. If you need any
help, just drop by #launchpad-
Cheers,
--
Guilherme Salgado <email address hidden>