Repository: freelawproject/juriscraper (language: python)

Issue:
Missing Court? Court.DoesNotExist: Court matching query does not exist.
Sentry Issue: [COURTLISTENER-1PN](https://sentry.io/organizations/freelawproject/issues/2574885120/?referrer=github_integration)

```
Court.DoesNotExist: Court matching query does not exist.
  File "cl/scrapers/management/commands/cl_scrape_opinions.py", line 354, in handle
    self.parse_and_scrape_site(mod, options["full_crawl"])
  File "cl/scrapers/management/commands/cl_scrape_opinions.py", line 324, in parse_and_scrape_site
    self.scrape_court(site, full_crawl)
  File "cl/scrapers/management/commands/cl_scrape_opinions.py", line 222, in scrape_court
    court = Court.objects.get(pk=court_str)
  File "django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "django/db/models/query.py", line 435, in get
    raise self.model.DoesNotExist(
```


Discussion / hints:
This needs to be looked at - we have a couple of minor courts that we are scraping that have non matching court ids based on juriscraper codes ... for example, `njtaxct` is our CL id for New Jersey Tax Court. but our court module is njtax - so we need to update that.  So a more extensive review of this is warranted.  

I recently fixed the virginislands to match the CL court id code 
- [x] juriscraper.opinions.united_states.territories.nmi
- [x] juriscraper.opinions.united_states.territories.vi
- [x] juriscraper.opinions.united_states.state.njtax_p
- [x] juriscraper.opinions.united_states.state.njtax_u

Fix patch:
diff --git a/juriscraper/opinions/united_states/state/__init__.py b/juriscraper/opinions/united_states/state/__init__.py
index 0a9229f7f..eaa980e2c 100644
--- a/juriscraper/opinions/united_states/state/__init__.py
+++ b/juriscraper/opinions/united_states/state/__init__.py
@@ -101,8 +101,8 @@
     "nj",
     "njsuperctappdiv_p",
     "njsuperctappdiv_u",
-    "njtax_p",
-    "njtax_u",
+    "njtaxct_p",
+    "njtaxct_u",
     "njsuperctappdiv_u",
     "ny",
     "nyag",
diff --git a/juriscraper/opinions/united_states/state/njtax_p.py b/juriscraper/opinions/united_states/state/njtaxct_p.py
similarity index 100%
rename from juriscraper/opinions/united_states/state/njtax_p.py
rename to juriscraper/opinions/united_states/state/njtaxct_p.py
diff --git a/juriscraper/opinions/united_states/state/njtax_u.py b/juriscraper/opinions/united_states/state/njtaxct_u.py
similarity index 100%
rename from juriscraper/opinions/united_states/state/njtax_u.py
rename to juriscraper/opinions/united_states/state/njtaxct_u.py
diff --git a/juriscraper/opinions/united_states/territories/__init__.py b/juriscraper/opinions/united_states/territories/__init__.py
index 041b72712..9afc35242 100644
--- a/juriscraper/opinions/united_states/territories/__init__.py
+++ b/juriscraper/opinions/united_states/territories/__init__.py
@@ -1,6 +1,6 @@
 __all__ = [
     "guam",
-    "nmi",
+    "nmariana",
     "pr",
     "prapp",
     "virginislands",
diff --git a/juriscraper/opinions/united_states/territories/nmi.py b/juriscraper/opinions/united_states/territories/nmariana.py
similarity index 100%
rename from juriscraper/opinions/united_states/territories/nmi.py
rename to juriscraper/opinions/united_states/territories/nmariana.py


Test patch:
diff --git a/tests/examples/opinions/united_states/njtax_p_example.compare.json b/tests/examples/opinions/united_states/njtaxct_p_example.compare.json
similarity index 100%
rename from tests/examples/opinions/united_states/njtax_p_example.compare.json
rename to tests/examples/opinions/united_states/njtaxct_p_example.compare.json
diff --git a/tests/examples/opinions/united_states/njtax_p_example.html b/tests/examples/opinions/united_states/njtaxct_p_example.html
similarity index 100%
rename from tests/examples/opinions/united_states/njtax_p_example.html
rename to tests/examples/opinions/united_states/njtaxct_p_example.html
diff --git a/tests/examples/opinions/united_states/njtax_u_example.compare.json b/tests/examples/opinions/united_states/njtaxct_u_example.compare.json
similarity index 100%
rename from tests/examples/opinions/united_states/njtax_u_example.compare.json
rename to tests/examples/opinions/united_states/njtaxct_u_example.compare.json
diff --git a/tests/examples/opinions/united_states/njtax_u_example.html b/tests/examples/opinions/united_states/njtaxct_u_example.html
similarity index 100%
rename from tests/examples/opinions/united_states/njtax_u_example.html
rename to tests/examples/opinions/united_states/njtaxct_u_example.html
diff --git a/tests/examples/opinions/united_states/nmi_example.compare.json b/tests/examples/opinions/united_states/nmariana_example.compare.json
similarity index 100%
rename from tests/examples/opinions/united_states/nmi_example.compare.json
rename to tests/examples/opinions/united_states/nmariana_example.compare.json
diff --git a/tests/examples/opinions/united_states/nmi_example.html b/tests/examples/opinions/united_states/nmariana_example.html
similarity index 100%
rename from tests/examples/opinions/united_states/nmi_example.html
rename to tests/examples/opinions/united_states/nmariana_example.html
diff --git a/tests/local/test_ScraperExtractFromTextTest.py b/tests/local/test_ScraperExtractFromTextTest.py
index 05f13c105..e869283f0 100644
--- a/tests/local/test_ScraperExtractFromTextTest.py
+++ b/tests/local/test_ScraperExtractFromTextTest.py
@@ -97,7 +97,7 @@ class ScraperExtractFromText(unittest.TestCase):
                 {"Docket": {"docket_number": "#30018-a-MES"}},
             ),
         ],
-        "juriscraper.opinions.united_states.territories.nmi": [
+        "juriscraper.opinions.united_states.territories.nmariana": [
             (
                 """#E-FILED\nCNMI SUPREME COURT\nE-filed: Apr 18 2022 06:53AM\nClerk Review: Apr 18 2022 06:54AM Filing ID: 67483376\nCase No.: 2021-SCC-0017-CIV\nJudy Aldan""",
                 {"Docket": {"docket_number": "2021-SCC-0017-CIV"}},