mirror of
https://github.com/haiwen/seahub.git
synced 2025-06-27 07:28:42 +00:00
16 lines
458 B
Python
16 lines
458 B
Python
import json
|
|
|
|
from django.core.urlresolvers import reverse
|
|
from tests.api.apitestbase import ApiTestBase
|
|
from tests.common.utils import apiurl
|
|
|
|
class RepoTokensTest(ApiTestBase):
|
|
|
|
def test_can_get(self):
|
|
with self.get_tmp_repo() as repo:
|
|
url = apiurl(reverse('api2-repo-tokens')) + '?repos=' + repo.repo_id
|
|
resp = self.get(url)
|
|
json_resp = json.loads(resp.content)
|
|
|
|
assert repo.repo_id in json_resp
|