MCPcopy Create free account
hub / github.com/modelscope/modelscope / test_upload_invalid_repo

Method test_upload_invalid_repo

tests/hub/test_hub_upload.py:161–169  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

159
160 @unittest.skipUnless(test_level() >= 1, 'skip test in current test level')
161 def test_upload_invalid_repo(self):
162 logger.info('test upload to invalid repo!')
163 self.api.login(TEST_ACCESS_TOKEN1)
164 with self.assertRaises((HTTPError, GitError)):
165 self.api.push_model(
166 model_id='%s/%s' % ('speech_tts', 'invalid_model_test'),
167 model_dir=self.finetune_path,
168 visibility=ModelVisibility.PUBLIC,
169 license=Licenses.APACHE_V2)
170
171 @unittest.skipUnless(test_level() >= 1, 'skip test in current test level')
172 def test_push_to_hub(self):

Callers

nothing calls this directly

Calls 2

infoMethod · 0.80
push_modelMethod · 0.80

Tested by

no test coverage detected