fix bugs due to problem id
This commit is contained in:
@@ -226,7 +226,7 @@ class UserProfileAPITest(APITestCase):
|
||||
|
||||
def test_get_profile_without_login(self):
|
||||
resp = self.client.get(self.url)
|
||||
self.assertDictEqual(resp.data, {"error": None, "data": 0})
|
||||
self.assertDictEqual(resp.data, {"error": None, "data": {}})
|
||||
|
||||
def test_get_profile(self):
|
||||
self.create_user("test", "test123")
|
||||
|
||||
@@ -39,7 +39,7 @@ class UserProfileAPI(APIView):
|
||||
"""
|
||||
user = request.user
|
||||
if not user.is_authenticated():
|
||||
return self.success(0)
|
||||
return self.success({})
|
||||
username = request.GET.get("username")
|
||||
try:
|
||||
if username:
|
||||
|
||||
Reference in New Issue
Block a user