Skip to content

Commit

Permalink
Additional test
Browse files Browse the repository at this point in the history
  • Loading branch information
audiodude committed Apr 29, 2024
1 parent 69931ec commit 3da7e85
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion wp1/selection/models/simple_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from unittest.mock import MagicMock

from wp1.base_db_test import BaseWpOneDbTest, get_first_selection
from wp1.exceptions import Wp1FatalSelectionError
from wp1.exceptions import Wp1FatalSelectionError, Wp1RetryableSelectionError
from wp1.models.wp10.builder import Builder
from wp1.selection.models.simple import Builder as SimpleBuilder

Expand Down Expand Up @@ -116,6 +116,11 @@ def test_build_decodes_utf8_and_url_encoding(self):
list=self.valid_items)
self.assertEqual(expected, actual)

def test_build_disallows_invalid(self):
simple_test_builder = SimpleBuilder()
with self.assertRaises(Wp1RetryableSelectionError):
simple_test_builder.build('text/tab-separated-values', list=['Foo#Bar'])

def test_validate_items(self):
simple_builder_test = SimpleBuilder()
expected = ([
Expand Down

0 comments on commit 3da7e85

Please sign in to comment.