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