diff --git a/onadata/apps/api/tests/viewsets/test_abstract_viewset.py b/onadata/apps/api/tests/viewsets/test_abstract_viewset.py index a3f144683b..4164a29f77 100644 --- a/onadata/apps/api/tests/viewsets/test_abstract_viewset.py +++ b/onadata/apps/api/tests/viewsets/test_abstract_viewset.py @@ -189,6 +189,8 @@ def _login_user_and_profile(self, extra_post_data=None): ) ) self.extra = {"HTTP_AUTHORIZATION": f"Token {self.user.auth_token}"} + self.login_username = self.profile_data["username"] + self.login_password = self.profile_data["password1"] def _org_create(self, org_data=None): org_data = {} if org_data is None else org_data diff --git a/onadata/apps/api/tests/viewsets/test_briefcase_viewset.py b/onadata/apps/api/tests/viewsets/test_briefcase_viewset.py index 67804088aa..1b91199eba 100644 --- a/onadata/apps/api/tests/viewsets/test_briefcase_viewset.py +++ b/onadata/apps/api/tests/viewsets/test_briefcase_viewset.py @@ -14,7 +14,6 @@ from django.utils import timezone from django_digest.test import DigestAuth -from rest_framework.test import APIRequestFactory from onadata.apps.api.tests.viewsets.test_abstract_viewset import TestAbstractViewSet from onadata.apps.api.viewsets.briefcase_viewset import ( @@ -41,9 +40,6 @@ class TestBriefcaseViewSet(TestAbstractViewSet): def setUp(self): super().setUp() - self.factory = APIRequestFactory() - self.login_username = "bob" - self.login_password = "bobbob" self.form_def_path = os.path.join( self.main_directory, "fixtures", "transportation", "transportation.xml" )