From 64aa43927e3439b457bd9801697e7ec26828c94c Mon Sep 17 00:00:00 2001 From: Kelvin Muchiri Date: Tue, 16 Apr 2024 14:28:25 +0300 Subject: [PATCH] refactor code --- onadata/apps/main/tests/test_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onadata/apps/main/tests/test_base.py b/onadata/apps/main/tests/test_base.py index a458b7d6ac..93dd94fa72 100644 --- a/onadata/apps/main/tests/test_base.py +++ b/onadata/apps/main/tests/test_base.py @@ -248,7 +248,7 @@ def _make_submission( self.factory = APIRequestFactory() if auth is None: - auth = DigestAuth("bob", "bob") + auth = DigestAuth(self.login_username, self.login_password) tmp_file = None @@ -306,7 +306,7 @@ def _make_submission_w_attachment(self, path, attachment_path): data["media_file"] = open(attachment_path, "rb") url = f"/{self.user.username}/submission" - auth = DigestAuth("bob", "bob") + auth = DigestAuth(self.login_username, self.login_password) self.factory = APIRequestFactory() request = self.factory.post(url, data) request.user = self.user