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

Method test_upload_without_token

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

Source from the content-addressed store, hash-verified

147
148 @unittest.skipUnless(test_level() >= 1, 'skip test in current test level')
149 def test_upload_without_token(self):
150 logger.info('test upload without login!')
151 self.api.login(TEST_ACCESS_TOKEN1)
152 delete_credential()
153 with self.assertRaises(NotLoginException):
154 self.api.push_model(
155 model_id=self.create_model_name,
156 model_dir=self.finetune_path,
157 visibility=ModelVisibility.PUBLIC,
158 license=Licenses.APACHE_V2)
159
160 @unittest.skipUnless(test_level() >= 1, 'skip test in current test level')
161 def test_upload_invalid_repo(self):

Callers

nothing calls this directly

Calls 3

delete_credentialFunction · 0.90
infoMethod · 0.80
push_modelMethod · 0.80

Tested by

no test coverage detected