Fix linting errors

This commit is contained in:
Erin 2023-10-20 16:15:03 -07:00
parent 15b16583cd
commit a30ed4725a
No known key found for this signature in database
GPG key ID: 1CAD275313C62460
3 changed files with 6 additions and 7 deletions

View file

@ -12,7 +12,6 @@ from unittest.mock import call
from epplibwrapper import (
commands,
RegistryError,
)
API_BASE_PATH = "/api/v1/available/"

View file

@ -25,7 +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."
"error": "Error finding domain availability.",
}
@ -67,7 +67,7 @@ def check_domain_available(domain):
else:
# domain search string doesn't end with .gov, add it on here
return Domain.available(domain + ".gov")
except:
except Exception:
return False
@ -99,7 +99,7 @@ def available(request, domain=""):
return JsonResponse(
{"available": False, "message": DOMAIN_API_MESSAGES["unavailable"]}
)
except:
except Exception:
return JsonResponse(
{"available": False, "message": DOMAIN_API_MESSAGES["error"]}
)

View file

@ -116,7 +116,7 @@ class TestURLAuth(TestCase):
"/openid/callback",
"/openid/callback/login/",
"/openid/callback/logout/",
"/api/v1/available"
"/api/v1/available",
]
def assertURLIsProtectedByAuth(self, url):