1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-16 22:17:59 +00:00
seahub/tests/api/test_avatar.py

14 lines
507 B
Python
Raw Normal View History

import unittest
2014-09-06 03:38:20 +00:00
from tests.api.apitestbase import ApiTestBase
2014-09-05 02:07:33 +00:00
from tests.api.urls import AVATAR_BASE_URL, GROUPS_URL
from tests.common.utils import randstring, apiurl, urljoin
2014-09-05 02:07:33 +00:00
class AvatarApiTest(ApiTestBase):
def test_user_avatar(self):
2014-09-06 03:38:20 +00:00
avatar_url = urljoin(AVATAR_BASE_URL, 'user', self.username, '/resized/80/')
2014-09-05 02:07:33 +00:00
info = self.get(avatar_url).json()
self.assertIsNotNone(info['url'])
self.assertIsNotNone(info['is_default'])
self.assertIsNotNone(info['mtime'])