|
|
|
@@ -14,12 +14,19 @@ class TestCheckLearnware(unittest.TestCase): |
|
|
|
|
|
|
|
self.client = LearnwareClient() |
|
|
|
self.client.login(email, token) |
|
|
|
self.learnware_id = "00000154" |
|
|
|
|
|
|
|
def test_check_learnware(self): |
|
|
|
def test_check_learnware_pip(self): |
|
|
|
learnware_id = "00000154" |
|
|
|
with tempfile.TemporaryDirectory(prefix="learnware_") as tempdir: |
|
|
|
self.zip_path = os.path.join(tempdir, "test.zip") |
|
|
|
self.client.download_learnware(self.learnware_id, self.zip_path) |
|
|
|
self.client.download_learnware(learnware_id, self.zip_path) |
|
|
|
LearnwareClient.check_learnware(self.zip_path) |
|
|
|
|
|
|
|
def test_check_learnware_conda(self): |
|
|
|
learnware_id = "00000148" |
|
|
|
with tempfile.TemporaryDirectory(prefix="learnware_") as tempdir: |
|
|
|
self.zip_path = os.path.join(tempdir, "test.zip") |
|
|
|
self.client.download_learnware(learnware_id, self.zip_path) |
|
|
|
LearnwareClient.check_learnware(self.zip_path) |
|
|
|
|
|
|
|
|
|
|
|
|