mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-17 18:09:25 +02:00
Add mocked responses for test_forms cases
This commit is contained in:
parent
c75891ee90
commit
15b16583cd
2 changed files with 6 additions and 1 deletions
|
@ -25,6 +25,7 @@ DOMAIN_API_MESSAGES = {
|
|||
"invalid": "Enter a domain using only letters,"
|
||||
" numbers, or hyphens (though we don't recommend using hyphens).",
|
||||
"success": "That domain is available!",
|
||||
"error": "Error finding domain availability."
|
||||
}
|
||||
|
||||
|
||||
|
@ -99,4 +100,6 @@ def available(request, domain=""):
|
|||
{"available": False, "message": DOMAIN_API_MESSAGES["unavailable"]}
|
||||
)
|
||||
except:
|
||||
raise RegistryError("Registry cannot find domain availability.")
|
||||
return JsonResponse(
|
||||
{"available": False, "message": DOMAIN_API_MESSAGES["error"]}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue