From ca9a0fbbca8205d8bad03112c4a21dee0cabf630 Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Wed, 16 Oct 2024 14:57:20 -0700 Subject: [PATCH] Clean up test coverage --- .../audit/combined_workspace_audit.py | 38 +------------------ 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/gregor_django/gregor_anvil/audit/combined_workspace_audit.py b/gregor_django/gregor_anvil/audit/combined_workspace_audit.py index 0885a4c6..05a8e7fc 100644 --- a/gregor_django/gregor_anvil/audit/combined_workspace_audit.py +++ b/gregor_django/gregor_anvil/audit/combined_workspace_audit.py @@ -18,7 +18,7 @@ class CombinedConsortiumDataWorkspaceAuthDomainAuditTable(tables.Table): note = tables.Column() action = tables.TemplateColumn( # Temporarily use this button template, until we have the resolve view working for this workspace type. - template_name="gregor_anvil/snippets/upload_workspace_auth_domain_audit_action_button.html" + template_name="gregor_anvil/snippets/combinedconsortiumdataworkspace_auth_domain_audit_action_button.html" ) class Meta: @@ -101,42 +101,6 @@ def _audit_workspace_and_dcc_admin_group(self, combined_workspace, managed_group else: self.needs_action.append(workspace_auth_domain_audit_results.AddAdmin(**audit_result_args)) - def _audit_workspace_and_dcc_group(self, combined_workspace, managed_group): - """Audit the auth domain membership for a specific workspace and the DCC writers/members groups. - - Expectations: - - Member before the workspace is completed. - - Not a member after the workspace is completed. - """ - current_membership = self._get_current_membership(combined_workspace, managed_group) - audit_result_args = { - "workspace": combined_workspace.workspace, - "managed_group": managed_group, - "current_membership_instance": current_membership, - } - - if not combined_workspace.date_completed: - note = self.DCC_BEFORE_COMPLETE - if not current_membership: - self.needs_action.append(workspace_auth_domain_audit_results.AddMember(note=note, **audit_result_args)) - elif current_membership and current_membership.role == GroupGroupMembership.MEMBER: - self.verified.append(workspace_auth_domain_audit_results.VerifiedMember(note=note, **audit_result_args)) - else: - self.errors.append(workspace_auth_domain_audit_results.ChangeToMember(note=note, **audit_result_args)) - else: - note = self.DCC_AFTER_COMPLETE - if not current_membership: - self.verified.append( - workspace_auth_domain_audit_results.VerifiedNotMember(note=note, **audit_result_args) - ) - elif current_membership and current_membership.role == GroupGroupMembership.MEMBER: - self.needs_action.append(workspace_auth_domain_audit_results.Remove(note=note, **audit_result_args)) - else: - self.errors.append(workspace_auth_domain_audit_results.Remove(note=note, **audit_result_args)) - - def _audit_workspace_and_dcc_member_group(self, combined_workspace, managed_group): - pass - def _audit_workspace_and_gregor_all_group(self, combined_workspace, managed_group): """Audit the auth domain membership for a specific workspace and the GREGOR_ALL group.