Code review comment for lp://staging/~allenap/launchpad/syncable-gnome-test-failure-bug-498602

Revision history for this message
Gavin Panella (allenap) wrote :

Bugzilla.getExternalBugTrackerToUse() makes network calls to sniff out the support offered by the remote Bugzilla.

TestCheckwatchesWithSyncableGnomeProducts.setUp() (in lib/lp/bugs/scripts/tests/test_checkwatches.py) patches in get_external_bugtracker() to always return a BugzillaAPI instance, in the assumption (I think) that BugzillaAPI.getExternalBugTrackerToUse() would return self, as the default implementation does.

However, BugzillaAPI inherits from Bugzilla, so sniffs anyway. This fails in PQM when landing to production-devel.

I've changed BugzillaAPI (and BugzillaLPPlugin for good measure) to just return self.

I would like to refactor this code to have a BugzillaSniffer class, which getExternalBugTrackerToUse() method can return one of Bugzilla, BugzillaAPI or BugzillaLPPlugin, none of which inherit from BugzillaSniffer. However, this branch is a simpler solution to get the test working again while I/we work on a better fix.

« Back to merge proposal