You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
736 B

  1. import unittest
  2. from data_import.pipeline.catalog import Options
  3. from projects.models import (
  4. DOCUMENT_CLASSIFICATION,
  5. IMAGE_CLASSIFICATION,
  6. INTENT_DETECTION_AND_SLOT_FILLING,
  7. SEQ2SEQ,
  8. SEQUENCE_LABELING,
  9. SPEECH2TEXT,
  10. )
  11. class TestOptions(unittest.TestCase):
  12. def test_return_at_least_one_option(self):
  13. tasks = [
  14. DOCUMENT_CLASSIFICATION,
  15. IMAGE_CLASSIFICATION,
  16. INTENT_DETECTION_AND_SLOT_FILLING,
  17. SEQ2SEQ,
  18. SEQUENCE_LABELING,
  19. SPEECH2TEXT,
  20. ]
  21. for task in tasks:
  22. with self.subTest(task=task):
  23. options = Options.filter_by_task(task)
  24. self.assertGreaterEqual(len(options), 1)