Skip to content

Commit 9b08313

Browse files
committed
tests for new repository wrappers
1 parent 889f8bb commit 9b08313

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

tests/test_repo.py

+3-22
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class TestRepo(unittest.TestCase):
1313
"""
14-
Testing interaction with the model repository.
14+
Testing our wrappers around HTRMoPo
1515
"""
1616

1717
def setUp(self):
@@ -33,30 +33,11 @@ def test_get_description(self):
3333
Tests fetching the description of a model.
3434
"""
3535
record = repo.get_description('10.5281/zenodo.8425684')
36-
self.assertEqual(record['doi'], '10.5281/zenodo.8425684')
37-
38-
def test_get_model(self):
39-
"""
40-
Tests fetching a model.
41-
"""
42-
id = repo.get_model('10.5281/zenodo.8425684',
43-
path=self.temp_model.name)
44-
self.assertEqual(id, 'omnisyr_best.mlmodel')
45-
self.assertEqual((self.temp_path / id).stat().st_size, 16245671)
36+
self.assertEqual(record.doi, '10.5281/zenodo.8425684')
4637

4738
def test_prev_record_version_get_description(self):
4839
"""
4940
Tests fetching the description of a model that has a superseding newer version.
5041
"""
5142
record = repo.get_description('10.5281/zenodo.6657809')
52-
self.assertEqual(record['doi'], '10.5281/zenodo.6657809')
53-
54-
def test_prev_record_version_get_model(self):
55-
"""
56-
Tests fetching a model that has a superseding newer version.
57-
"""
58-
id = repo.get_model('10.5281/zenodo.6657809',
59-
path=self.temp_model.name)
60-
self.assertEqual(id, 'HTR-United-Manu_McFrench.mlmodel')
61-
self.assertEqual((self.temp_path / id).stat().st_size, 16176844)
62-
43+
self.assertEqual(record.doi, '10.5281/zenodo.6657809')

0 commit comments

Comments
 (0)