def METHOD_NAME(self):
    """Test get_form_url()."""
    request = RequestFactory().get("/")
    # default https://ona.io
    url = get_form_url(request)
    self.assertEqual(url, "https://ona.io")
    # with username https://ona.io/bob
    url = get_form_url(request, username="bob")
    self.assertEqual(url, "https://ona.io/bob")
    # with http protocol http://ona.io/bob
    url = get_form_url(request, username="bob", protocol="http")
    self.assertEqual(url, "http://ona.io/bob")
    # preview url http://ona.io/preview/bob
    url = get_form_url(request, username="bob", protocol="http", preview=True)
    self.assertEqual(url, "http://ona.io/preview/bob")
    # with form pk url http://ona.io/bob/1
    url = get_form_url(request, username="bob", xform_pk=1)
    self.assertEqual(url, "https://ona.io/bob/1")
    # with form uuid url https://ona.io/enketo/492
    url = get_form_url(request, xform_pk=492, generate_consistent_urls=True)
    self.assertEqual(url, "https://ona.io/enketo/492")