| 101 | class DownloadCMDTokenTest(unittest.TestCase): |
| 102 | |
| 103 | def setUp(self): |
| 104 | print(('Testing %s.%s' % (type(self).__name__, self._testMethodName))) |
| 105 | self.api = HubApi() |
| 106 | |
| 107 | # Create private model repo |
| 108 | self.model_id = '%s/%s' % (TEST_MODEL_ORG, 'test_model_with_token') |
| 109 | self.api.create_repo( |
| 110 | repo_id=self.model_id, |
| 111 | repo_type='model', |
| 112 | visibility='private', |
| 113 | license=Licenses.APACHE_V2, |
| 114 | chinese_name=TEST_MODEL_CHINESE_NAME, |
| 115 | exist_ok=True, |
| 116 | ) |
| 117 | |
| 118 | # Create private dataset repo |
| 119 | self.dataset_id = '%s/%s' % (TEST_MODEL_ORG, 'test_dataset_with_token') |
| 120 | self.api.create_repo( |
| 121 | repo_id=self.dataset_id, |
| 122 | repo_type='dataset', |
| 123 | visibility='private', |
| 124 | license=Licenses.APACHE_V2, |
| 125 | exist_ok=True, |
| 126 | ) |
| 127 | |
| 128 | def tearDown(self): |
| 129 | try: |