From ca4f0bffad0ea298b29192f18b918be954fd978a Mon Sep 17 00:00:00 2001 From: Bryce Willey Date: Tue, 3 Jun 2025 12:00:37 -0400 Subject: [PATCH 1/6] Some python integration test changes --- .../EFSPIntegration/test/integration_test.py | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/docassemble/EFSPIntegration/test/integration_test.py b/docassemble/EFSPIntegration/test/integration_test.py index c36ca4a..4edc4e0 100644 --- a/docassemble/EFSPIntegration/test/integration_test.py +++ b/docassemble/EFSPIntegration/test/integration_test.py @@ -378,28 +378,31 @@ def test_court_record(self): # contact = {} # contact["first"] = "John" # contact["last"] = "Brown" - docket_number = "2018SC241" + + COURT = "tazewell" + + docket_number = "2022-SC-000005" cases = self.basic_assert( self.proxy_conn.get_cases_raw( - "adams", docket_number=docket_number + "tazewell", docket_number=docket_number ) # person_name=contact) ) assert len(cases.data) > 0 case_id = cases.data[0]["value"]["caseTrackingID"]["value"] - case = self.basic_assert(self.proxy_conn.get_case("adams", case_id)) - doc_resp = self.proxy_conn.get_document("adams", case_id) + case_info = self.basic_assert(self.proxy_conn.get_case(COURT, case_id)) + doc_resp = self.proxy_conn.get_document(COURT, case_id) assert doc_resp.response_code == 405 serv_info = self.basic_assert( - self.proxy_conn.get_service_information("adams", case_id) + self.proxy_conn.get_service_information(COURT, case_id) ) history_serv_info = self.basic_assert( - self.proxy_conn.get_service_information_history("adams", case_id) + self.proxy_conn.get_service_information_history(COURT, case_id) ) if len(serv_info.data) > 0: serv_id = serv_info.data[0] attach_cases = self.proxy_conn.get_service_attach_case_list( - "adams", serv_id + COURT, serv_id ) if self.verbose: print(attach_cases) @@ -521,18 +524,18 @@ def main(*, base_url, api_key, user_email=None, user_password=None): proxy_conn = EfspConnection( url=base_url, api_key=api_key, default_jurisdiction="illinois" ) - proxy_conn.set_verbose_logging(False) + proxy_conn.set_verbose_logging(True) tc = TestClass( - proxy_conn, verbose=False, user_email=user_email, user_password=user_password + proxy_conn, verbose=True, user_email=user_email, user_password=user_password ) tc.test_authenticate() - tc.test_hateos() + #tc.test_hateos() # tc.test_self_user() - tc.test_firm() - tc.test_service_contacts() - tc.test_get_courts() - tc.test_payment_accounts() - tc.test_attorneys() + #tc.test_firm() + #tc.test_service_contacts() + #tc.test_get_courts() + #tc.test_payment_accounts() + #tc.test_attorneys() tc.test_court_record() tc.test_users() tc.test_codes() From ee76eadfd7c54705a845b851a55f9af6e238948a Mon Sep 17 00:00:00 2001 From: Bryce Willey Date: Fri, 20 Jun 2025 10:47:05 -0400 Subject: [PATCH 2/6] Fix integration test --- .../EFSPIntegration/test/integration_test.py | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docassemble/EFSPIntegration/test/integration_test.py b/docassemble/EFSPIntegration/test/integration_test.py index 4edc4e0..e0d615e 100644 --- a/docassemble/EFSPIntegration/test/integration_test.py +++ b/docassemble/EFSPIntegration/test/integration_test.py @@ -275,8 +275,10 @@ def test_users(self): full_user = self.basic_assert(self.proxy_conn.get_user(new_id)) assert full_user.data["middleName"] == "S" - all_users = self.basic_assert(self.proxy_conn.get_users()) - assert len(all_users.data) == len(all_initial_users.data) + 1 + self.basic_assert(self.proxy_conn.get_users()) + # With paging, there are now limits to how many users we can see + # Also, we have 203 users now because removing them doesn't remove them, lol + # assert len(all_users.data) == len(all_initial_users.data) + 1 roles = self.basic_assert(self.proxy_conn.get_user_roles(new_id)) assert len(roles.data) == 1 @@ -529,13 +531,13 @@ def main(*, base_url, api_key, user_email=None, user_password=None): proxy_conn, verbose=True, user_email=user_email, user_password=user_password ) tc.test_authenticate() - #tc.test_hateos() - # tc.test_self_user() - #tc.test_firm() - #tc.test_service_contacts() - #tc.test_get_courts() - #tc.test_payment_accounts() - #tc.test_attorneys() + tc.test_hateos() + tc.test_self_user() + tc.test_firm() + tc.test_service_contacts() + tc.test_get_courts() + tc.test_payment_accounts() + tc.test_attorneys() tc.test_court_record() tc.test_users() tc.test_codes() From 58ee32eb9fb90b950b4cc488f393323698c9edfc Mon Sep 17 00:00:00 2001 From: Bryce Willey Date: Fri, 20 Jun 2025 10:50:26 -0400 Subject: [PATCH 3/6] Use ubuntu-latest in publish workflow Ubuntu 20.04 is being retired from GitHub (https://github.com/actions/runner-images/issues/11101). Definitely churn we shouldn't need to think about (unless it breaks), so just using latest all the time instead. --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ffb7e71..1e28284 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,7 +5,7 @@ on: push jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: SuffolkLITLab/ALActions/publish@main with: From 7dbbbd3ec05dd57831a66e7424c1ebd18402df86 Mon Sep 17 00:00:00 2001 From: Bryce Willey Date: Fri, 20 Jun 2025 11:23:58 -0400 Subject: [PATCH 4/6] Use a new email without conflicts Can't delete the fakeemail users, but I guess removing them does change their email. --- docassemble/EFSPIntegration/test/integration_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docassemble/EFSPIntegration/test/integration_test.py b/docassemble/EFSPIntegration/test/integration_test.py index e0d615e..db12dd1 100644 --- a/docassemble/EFSPIntegration/test/integration_test.py +++ b/docassemble/EFSPIntegration/test/integration_test.py @@ -32,7 +32,7 @@ def get_proxy_server_ip(): def mock_person(): per = {} - per["email"] = "fakeemail@example.com" + per["email"] = "fakeemail-no-conflicts@example.com" # Neat trick: https://stackoverflow.com/a/24448351/11416267 per["name"] = { "first": "B", From eae53f6f04238ecb1abcc2fbc424d08129a50681 Mon Sep 17 00:00:00 2001 From: Bryce Willey Date: Fri, 20 Jun 2025 11:30:41 -0400 Subject: [PATCH 5/6] Don't make it verbose --- docassemble/EFSPIntegration/test/integration_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docassemble/EFSPIntegration/test/integration_test.py b/docassemble/EFSPIntegration/test/integration_test.py index db12dd1..b42e9ac 100644 --- a/docassemble/EFSPIntegration/test/integration_test.py +++ b/docassemble/EFSPIntegration/test/integration_test.py @@ -526,9 +526,9 @@ def main(*, base_url, api_key, user_email=None, user_password=None): proxy_conn = EfspConnection( url=base_url, api_key=api_key, default_jurisdiction="illinois" ) - proxy_conn.set_verbose_logging(True) + proxy_conn.set_verbose_logging(False) tc = TestClass( - proxy_conn, verbose=True, user_email=user_email, user_password=user_password + proxy_conn, verbose=False, user_email=user_email, user_password=user_password ) tc.test_authenticate() tc.test_hateos() From 34a44846f83423436f86c4edd883e6e2cd9fde63 Mon Sep 17 00:00:00 2001 From: Bryce Willey Date: Fri, 20 Jun 2025 13:26:50 -0400 Subject: [PATCH 6/6] Formatting --- docassemble/EFSPIntegration/test/integration_test.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docassemble/EFSPIntegration/test/integration_test.py b/docassemble/EFSPIntegration/test/integration_test.py index b42e9ac..f0a22a6 100644 --- a/docassemble/EFSPIntegration/test/integration_test.py +++ b/docassemble/EFSPIntegration/test/integration_test.py @@ -403,9 +403,7 @@ def test_court_record(self): if len(serv_info.data) > 0: serv_id = serv_info.data[0] - attach_cases = self.proxy_conn.get_service_attach_case_list( - COURT, serv_id - ) + attach_cases = self.proxy_conn.get_service_attach_case_list(COURT, serv_id) if self.verbose: print(attach_cases)