def METHOD_NAME(self):
    with context.request_context(RequestFactory().get("/")):
        self.assertTrue(get_adapter().is_safe_url("http://allowed_host/"))
        self.assertFalse(get_adapter().is_safe_url("http://other_host/"))