(self)
| 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): |
nothing calls this directly
no test coverage detected