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

Method setUp

tests/hub/test_hub_revision.py:27–39  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

25class HubRevisionTest(unittest.TestCase):
26
27 def setUp(self):
28 self.api = HubApi()
29 self.api.login(TEST_ACCESS_TOKEN1)
30 self.model_name = 'rv-%s' % (uuid.uuid4().hex)
31 self.model_id = '%s/%s' % (TEST_MODEL_ORG, self.model_name)
32 self.revision = 'v0.1_test_revision'
33 self.revision2 = 'v0.2_test_revision'
34 self.api.create_model(
35 model_id=self.model_id,
36 visibility=ModelVisibility.PUBLIC,
37 license=Licenses.APACHE_V2,
38 chinese_name=TEST_MODEL_CHINESE_NAME,
39 )
40
41 def tearDown(self):
42 try:

Callers

nothing calls this directly

Calls 2

HubApiClass · 0.90
create_modelMethod · 0.45

Tested by

no test coverage detected