Skip to content

Commit

Permalink
Add test for sets
Browse files Browse the repository at this point in the history
  • Loading branch information
physikerwelt committed Oct 20, 2024
1 parent e2e2ecb commit 4d27ad0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/zbmath_rest2oai/get_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ def get_sets():
+ 'https://guidelines.openaire.eu/en/latest/literature'
+ '/use_of_oai_pmh.html'}
for result in results:
mscs[result['code'][:2]] = result['short_title']
code = result['code'][:2]
mscs[code] = code + '-XX:' + result['short_title']
return mscs


Expand Down
13 changes: 13 additions & 0 deletions test/test_get_sets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import unittest

from zbmath_rest2oai.get_sets import get_sets


class PlainXmlTest(unittest.TestCase):
@staticmethod
def test_getSets():
real_sets = get_sets()
assert len(real_sets) == 65
assert real_sets['14'] == '14-XX:Algebraic geometry'


0 comments on commit 4d27ad0

Please sign in to comment.