Repository: cisagov/manage.get.gov

Issue:
Case Sensitive Input for checking availability in beta.get.gov
### Current Behavior

When inputting a domain, ie "rebecca" -- a user is able to see that it is available. However, when putting in "Rebecca" with a capital R, it says the domain is not available. 

![image](https://github.com/cisagov/manage.get.gov/assets/13954664/f6ada004-c5e2-4a6d-96ba-a4efabe20b14)


### Expected Behavior

When inputting both "rebecca" and "Rebecca" for a domain on beta.get.gov, both domains should be available.

### Steps to Reproduce

1. 

### Environment

_No response_

### Additional Context

Slack discussion: https://cisa-corp.slack.com/archives/C05BDEA3C11/p1699653372653609?thread_ts=1699652700.172109&cid=C05BDEA3C11

OG ticket: https://github.com/cisagov/getgov-home/pull/100

### Issue Links

_No response_


Discussion:

Resolving patch:
diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py
--- a/src/registrar/models/domain.py
+++ b/src/registrar/models/domain.py
@@ -174,7 +174,8 @@ def available(cls, domain: str) -> bool:
         """Check if a domain is available."""
         if not cls.string_could_be_domain(domain):
             raise ValueError("Not a valid domain: %s" % str(domain))
-        req = commands.CheckDomain([domain])
+        domain_name = domain.lower()
+        req = commands.CheckDomain([domain_name])
         return registry.send(req, cleaned=True).res_data[0].avail
 
     @classmethod


Test patch:
diff --git a/src/api/tests/test_available.py b/src/api/tests/test_available.py
--- a/src/api/tests/test_available.py
+++ b/src/api/tests/test_available.py
@@ -69,8 +69,8 @@ def test_domain_available_capitalized(self):
         self.assertTrue(check_domain_available("igorville.gov"))
         # input is lowercased so GSA.GOV should also not be available
         self.assertFalse(check_domain_available("GSA.gov"))
-        # input is lowercased so IGORVILLE.GOV should also not be available
-        self.assertFalse(check_domain_available("IGORVILLE.gov"))
+        # input is lowercased so IGORVILLE.GOV should also be available
+        self.assertTrue(check_domain_available("IGORVILLE.gov"))
 
     def test_domain_available_dotgov(self):
         """Domain searches work without trailing .gov"""
diff --git a/src/registrar/tests/common.py b/src/registrar/tests/common.py
--- a/src/registrar/tests/common.py
+++ b/src/registrar/tests/common.py
@@ -829,10 +829,8 @@ def _mockDomainName(self, _name, _avail=False):
     def mockCheckDomainCommand(self, _request, cleaned):
         if "gsa.gov" in getattr(_request, "names", None):
             return self._mockDomainName("gsa.gov", False)
-        elif "GSA.gov" in getattr(_request, "names", None):
-            return self._mockDomainName("GSA.gov", False)
         elif "igorville.gov" in getattr(_request, "names", None):
-            return self._mockDomainName("igorvilleremixed.gov", True)
+            return self._mockDomainName("igorville.gov", True)
         elif "top-level-agency.gov" in getattr(_request, "names", None):
             return self._mockDomainName("top-level-agency.gov", True)
         elif "city.gov" in getattr(_request, "names", None):