From bcf26a591d4c8fc4d80b177ee7305eaade78f61f Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Wed, 13 Nov 2024 09:22:25 -0800 Subject: [PATCH] More coverage cleanup --- anvil_consortium_manager/tests/test_forms.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/anvil_consortium_manager/tests/test_forms.py b/anvil_consortium_manager/tests/test_forms.py index c969f246..20d85152 100644 --- a/anvil_consortium_manager/tests/test_forms.py +++ b/anvil_consortium_manager/tests/test_forms.py @@ -699,13 +699,13 @@ class Meta: fields = ("billing_project", "name", "authorization_domains") def clean_authorization_domains(self): + # No return statement because the test never gets there, and it breaks coverage. authorization_domains = self.cleaned_data.get("authorization_domains") if authorization_domains: for auth_domain in authorization_domains: print(auth_domain.name) if auth_domain.name == "invalid-name": raise forms.ValidationError("Test error") - return authorization_domains # pragma: no cover class TestWorkspaceCloneForm(forms.WorkspaceCloneFormMixin, TestWorkspaceForm): class Meta(TestWorkspaceForm.Meta): @@ -737,9 +737,6 @@ class Meta: def clean_authorization_domains(self): authorization_domains = self.cleaned_data.get("authorization_domains") - if authorization_domains: - for auth_domain in authorization_domains: - print(auth_domain.name) return authorization_domains class TestWorkspaceCloneForm(forms.WorkspaceCloneFormMixin, TestWorkspaceForm):