support: Update remote server support search test.

Creates some reusable helper functions and adds remote realms to
the search results that are checked, which gives coverage for the
remote realm user counts in the support view.
This commit is contained in:
Lauryn Menard
2023-12-19 16:20:18 +01:00
committed by Tim Abbott
parent 22e035d8e2
commit 653901fc30
2 changed files with 128 additions and 67 deletions

View File

@@ -155,7 +155,7 @@ def get_current_plan_data_for_support_view(billing_session: BillingSession) -> P
def get_data_for_support_view(billing_session: BillingSession) -> SupportData:
if isinstance(billing_session, RemoteServerBillingSession):
user_data = get_remote_server_guest_and_non_guest_count(billing_session.remote_server.id)
else: # nocoverage
else:
assert isinstance(billing_session, RemoteRealmBillingSession)
user_data = get_remote_realm_guest_and_non_guest_count(billing_session.remote_realm)
plan_data = get_current_plan_data_for_support_view(billing_session)