mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 10:59:21 +02:00
Fix linting errors
This commit is contained in:
parent
15b16583cd
commit
a30ed4725a
3 changed files with 6 additions and 7 deletions
|
@ -12,7 +12,6 @@ from unittest.mock import call
|
||||||
|
|
||||||
from epplibwrapper import (
|
from epplibwrapper import (
|
||||||
commands,
|
commands,
|
||||||
RegistryError,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
API_BASE_PATH = "/api/v1/available/"
|
API_BASE_PATH = "/api/v1/available/"
|
||||||
|
|
|
@ -25,7 +25,7 @@ DOMAIN_API_MESSAGES = {
|
||||||
"invalid": "Enter a domain using only letters,"
|
"invalid": "Enter a domain using only letters,"
|
||||||
" numbers, or hyphens (though we don't recommend using hyphens).",
|
" numbers, or hyphens (though we don't recommend using hyphens).",
|
||||||
"success": "That domain is available!",
|
"success": "That domain is available!",
|
||||||
"error": "Error finding domain availability."
|
"error": "Error finding domain availability.",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ def check_domain_available(domain):
|
||||||
else:
|
else:
|
||||||
# domain search string doesn't end with .gov, add it on here
|
# domain search string doesn't end with .gov, add it on here
|
||||||
return Domain.available(domain + ".gov")
|
return Domain.available(domain + ".gov")
|
||||||
except:
|
except Exception:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ def available(request, domain=""):
|
||||||
return JsonResponse(
|
return JsonResponse(
|
||||||
{"available": False, "message": DOMAIN_API_MESSAGES["unavailable"]}
|
{"available": False, "message": DOMAIN_API_MESSAGES["unavailable"]}
|
||||||
)
|
)
|
||||||
except:
|
except Exception:
|
||||||
return JsonResponse(
|
return JsonResponse(
|
||||||
{"available": False, "message": DOMAIN_API_MESSAGES["error"]}
|
{"available": False, "message": DOMAIN_API_MESSAGES["error"]}
|
||||||
)
|
)
|
||||||
|
|
|
@ -116,7 +116,7 @@ class TestURLAuth(TestCase):
|
||||||
"/openid/callback",
|
"/openid/callback",
|
||||||
"/openid/callback/login/",
|
"/openid/callback/login/",
|
||||||
"/openid/callback/logout/",
|
"/openid/callback/logout/",
|
||||||
"/api/v1/available"
|
"/api/v1/available",
|
||||||
]
|
]
|
||||||
|
|
||||||
def assertURLIsProtectedByAuth(self, url):
|
def assertURLIsProtectedByAuth(self, url):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue