Skip to content

Commit

Permalink
Clean-up: Add docstring and reformat token string
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankApiyo committed Aug 14, 2024
1 parent d3f7bd7 commit b062185
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion onadata/apps/api/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def mock_get_full_dict(
self.assertFalse(instance.json)

def set_cache_for_org(org, request):
"""Utility to set org cache"""
org_profile_json = OrganizationSerializer(
org, context={"request": request}
).data
Expand All @@ -140,7 +141,7 @@ def setUp(self):
self.org = OrganizationProfile.objects.create(
user=self.org_user, name="Ona Org", creator=alice
)
self.extra = {"HTTP_AUTHORIZATION": "Token %s" % self.user.auth_token}
self.extra = {"HTTP_AUTHORIZATION": f"Token {self.user.auth_token}"}

def test_user_added_to_org(self, mock_add):
"""User is added to organization"""
Expand Down

0 comments on commit b062185

Please sign in to comment.