diff --git a/onadata/apps/api/tests/test_tasks.py b/onadata/apps/api/tests/test_tasks.py index 54e191d02d..b7d8ce5bc0 100644 --- a/onadata/apps/api/tests/test_tasks.py +++ b/onadata/apps/api/tests/test_tasks.py @@ -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 @@ -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"""