File: test_ols.py

package info (click to toggle)
python-bioregistry 0.11.12-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,244 kB
  • sloc: python: 16,082; makefile: 10
file content (20 lines) | stat: -rw-r--r-- 584 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# -*- coding: utf-8 -*-

"""Tests for the OLS."""

import json
import unittest

from bioregistry.external.ols import OLS_PROCESSING, VersionType


class TestOLS(unittest.TestCase):
    """Tests for the OLS."""

    def test_version_types(self):
        """Test all processing configurations have valid version types."""
        data = json.loads(OLS_PROCESSING.read_text())
        for entry in data["configurations"]:
            prefix = entry["prefix"]
            with self.subTest(prefix=prefix):
                self.assertIsNotNone(getattr(VersionType, entry["version_type"]))