Skip to content

Commit dd6b652

Browse files
Fix integration test (#263)
Gets it a working state now that SuffolkLITLab/EfileProxyServer#217 is merged. Also needed some clean ups: * update the GitHub Action runner to `ubuntu-latest` (no need to specify `20.04`) * loosen the assertion that we make a new user each time (can't get all users in a single call now that paging is a thing, which hasn't been integrated into the python side / DA interface yet) * change the example case to search to one that exists (the old one was removed)
1 parent 4589b1a commit dd6b652

2 files changed

Lines changed: 17 additions & 14 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: push
55
jobs:
66
build-n-publish:
77
name: Build and publish Python 🐍 distributions 📦 to PyPI
8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-latest
99
steps:
1010
- uses: SuffolkLITLab/ALActions/publish@main
1111
with:

docassemble/EFSPIntegration/test/integration_test.py

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def get_proxy_server_ip():
3232

3333
def mock_person():
3434
per = {}
35-
per["email"] = "fakeemail@example.com"
35+
per["email"] = "fakeemail-no-conflicts@example.com"
3636
# Neat trick: https://stackoverflow.com/a/24448351/11416267
3737
per["name"] = {
3838
"first": "B",
@@ -275,8 +275,10 @@ def test_users(self):
275275
full_user = self.basic_assert(self.proxy_conn.get_user(new_id))
276276
assert full_user.data["middleName"] == "S"
277277

278-
all_users = self.basic_assert(self.proxy_conn.get_users())
279-
assert len(all_users.data) == len(all_initial_users.data) + 1
278+
self.basic_assert(self.proxy_conn.get_users())
279+
# With paging, there are now limits to how many users we can see
280+
# Also, we have 203 users now because removing them doesn't remove them, lol
281+
# assert len(all_users.data) == len(all_initial_users.data) + 1
280282

281283
roles = self.basic_assert(self.proxy_conn.get_user_roles(new_id))
282284
assert len(roles.data) == 1
@@ -378,29 +380,30 @@ def test_court_record(self):
378380
# contact = {}
379381
# contact["first"] = "John"
380382
# contact["last"] = "Brown"
381-
docket_number = "2018SC241"
383+
384+
COURT = "tazewell"
385+
386+
docket_number = "2022-SC-000005"
382387
cases = self.basic_assert(
383388
self.proxy_conn.get_cases_raw(
384-
"adams", docket_number=docket_number
389+
"tazewell", docket_number=docket_number
385390
) # person_name=contact)
386391
)
387392
assert len(cases.data) > 0
388393
case_id = cases.data[0]["value"]["caseTrackingID"]["value"]
389-
case = self.basic_assert(self.proxy_conn.get_case("adams", case_id))
390-
doc_resp = self.proxy_conn.get_document("adams", case_id)
394+
case_info = self.basic_assert(self.proxy_conn.get_case(COURT, case_id))
395+
doc_resp = self.proxy_conn.get_document(COURT, case_id)
391396
assert doc_resp.response_code == 405
392397
serv_info = self.basic_assert(
393-
self.proxy_conn.get_service_information("adams", case_id)
398+
self.proxy_conn.get_service_information(COURT, case_id)
394399
)
395400
history_serv_info = self.basic_assert(
396-
self.proxy_conn.get_service_information_history("adams", case_id)
401+
self.proxy_conn.get_service_information_history(COURT, case_id)
397402
)
398403

399404
if len(serv_info.data) > 0:
400405
serv_id = serv_info.data[0]
401-
attach_cases = self.proxy_conn.get_service_attach_case_list(
402-
"adams", serv_id
403-
)
406+
attach_cases = self.proxy_conn.get_service_attach_case_list(COURT, serv_id)
404407
if self.verbose:
405408
print(attach_cases)
406409

@@ -527,7 +530,7 @@ def main(*, base_url, api_key, user_email=None, user_password=None):
527530
)
528531
tc.test_authenticate()
529532
tc.test_hateos()
530-
# tc.test_self_user()
533+
tc.test_self_user()
531534
tc.test_firm()
532535
tc.test_service_contacts()
533536
tc.test_get_courts()

0 commit comments

Comments
 (0)