mirror of
				https://github.com/haiwen/seahub.git
				synced 2025-10-31 01:00:09 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			445 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			445 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import json
 | |
| 
 | |
| from django.urls 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
 |