From d6201fc31f56c827f0e27cba6d569cd3be8cb630 Mon Sep 17 00:00:00 2001 From: Erin Song <121973038+erinysong@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:02:37 -0700 Subject: [PATCH] Add description to rdap endpoint --- src/api/tests/test_rdap.py | 9 +-------- src/api/views.py | 3 +-- src/registrar/tests/test_url_auth.py | 1 + 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/api/tests/test_rdap.py b/src/api/tests/test_rdap.py index beb40835b..789a99152 100644 --- a/src/api/tests/test_rdap.py +++ b/src/api/tests/test_rdap.py @@ -6,14 +6,7 @@ from django.contrib.auth import get_user_model from django.test import RequestFactory from django.test import TestCase -from ..views import available, check_domain_available, rdap -from .common import less_console_noise -from registrar.utility.errors import GenericError, GenericErrorCodes -from unittest.mock import call - -from epplibwrapper import ( - commands, -) +from ..views import rdap API_BASE_PATH = "/api/v1/rdap/?domain=" diff --git a/src/api/views.py b/src/api/views.py index 4f0670266..116762307 100644 --- a/src/api/views.py +++ b/src/api/views.py @@ -103,8 +103,7 @@ def available(request, domain=""): @require_http_methods(["GET"]) @login_not_required def rdap(request, domain=""): - """TODO: Write description""" - Domain = apps.get_model("registrar.Domain") + """Returns JSON dictionary of a domain's RDAP data from Cloudflare API""" domain = request.GET.get("domain", "") # If inputted domain doesn't have a TLD, append .gov to it diff --git a/src/registrar/tests/test_url_auth.py b/src/registrar/tests/test_url_auth.py index 284ec7638..1cd2d1384 100644 --- a/src/registrar/tests/test_url_auth.py +++ b/src/registrar/tests/test_url_auth.py @@ -116,6 +116,7 @@ class TestURLAuth(TestCase): "/api/v1/available/", "/api/v1/get-report/current-federal", "/api/v1/get-report/current-full", + "/api/v1/rdap/", "/health", ]