Skip to content

Commit

Permalink
add attributes login_username, login_password to TestAbstractViewSet
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvin-muchiri committed Apr 16, 2024
1 parent 3b6ca99 commit 8ee4a7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions onadata/apps/api/tests/viewsets/test_abstract_viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions onadata/apps/api/tests/viewsets/test_briefcase_viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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"
)
Expand Down

0 comments on commit 8ee4a7d

Please sign in to comment.