~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/launchpad/test_lp_api.py

  • Committer: Vincent Ladeuil
  • Date: 2010-01-25 17:48:22 UTC
  • mto: (4987.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4988.
  • Revision ID: v.ladeuil+lp@free.fr-20100125174822-nce4l19sbwx83jvq
Deploying the new overrideAttr facility further reduces the complexity
and make the code clearer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
    def patch(self, obj, name, value):
41
41
        """Temporarily set the 'name' attribute of 'obj' to 'value'."""
42
 
        self.addAttrCleanup(obj, name)
43
 
        setattr(obj, name, value)
 
42
        self.overrideAttr(obj, name, value)
44
43
 
45
44
    def test_get_launchpadlib_version(self):
46
45
        # parse_launchpadlib_version returns a tuple of a version number of