diff --git a/src/diffpy/pdfgui/tests/testaboutdialog.py b/src/diffpy/pdfgui/tests/testaboutdialog.py index 1123d46d..44078276 100644 --- a/src/diffpy/pdfgui/tests/testaboutdialog.py +++ b/src/diffpy/pdfgui/tests/testaboutdialog.py @@ -43,11 +43,13 @@ def _clickbutton(self, button): self.dialog.ProcessEvent(e) return + def set_url(self, u): + setattr(self, "url", u) + def test_LogoClicks(self): "Check handling of clicks on various logos" d = self.dialog - stealurl = lambda u: setattr(self, "url", u) - with overridewebbrowser(stealurl): + with overridewebbrowser(self.set_url): self._clickbutton(d.bitmap_button_nsf) self.assertTrue(self.url.endswith("www.nsf.gov")) self._clickbutton(d.bitmap_button_danse)