@property
    def url(self):
        """Shortcut for activate url."""
        form = self.app.get(
            reverse("registration_register")).forms["accountform"]
        form["username"] = "new"
        form["email"] = "new@example.com"
        form["password1"] = "sekrit123"
        form["password2"] = "sekrit123"
        form.submit(status=302)

        for line in mail.outbox[0].body.splitlines():
            if "://" in line:
                return line.strip()

        self.fail("Activation link not found in activation email.")
dataset/ETHPy150Open mozilla/moztrap/tests/view/users/test_views.py/ActivateTest.url/original