mirror of https://github.com/zulip/zulip.git
coverage: Bring zerver.lib.narrow.py to 100% coverage.
This commit is contained in:
parent
56b1f79fe3
commit
e3cfb256dd
|
@ -73,7 +73,6 @@ not_yet_fully_covered = {
|
|||
'zerver/lib/events.py',
|
||||
'zerver/lib/i18n.py',
|
||||
'zerver/lib/message.py',
|
||||
'zerver/lib/narrow.py',
|
||||
'zerver/lib/notifications.py',
|
||||
'zerver/lib/push_notifications.py',
|
||||
'zerver/lib/request.py',
|
||||
|
|
|
@ -21,6 +21,7 @@ from zerver.lib.message import (
|
|||
from zerver.lib.narrow import (
|
||||
build_narrow_filter,
|
||||
)
|
||||
from zerver.lib.request import JsonableError
|
||||
from zerver.lib.str_utils import force_bytes
|
||||
from zerver.lib.sqlalchemy_utils import get_sqlalchemy_connection
|
||||
from zerver.lib.test_helpers import (
|
||||
|
@ -342,6 +343,11 @@ class BuildNarrowFilterTest(TestCase):
|
|||
for e in reject_events:
|
||||
self.assertFalse(narrow_filter(e))
|
||||
|
||||
def test_build_narrow_filter_invalid(self):
|
||||
# type: () -> None
|
||||
with self.assertRaises(JsonableError):
|
||||
build_narrow_filter(["invalid_operator", "operand"])
|
||||
|
||||
class IncludeHistoryTest(ZulipTestCase):
|
||||
def test_ok_to_include_history(self):
|
||||
# type: () -> None
|
||||
|
|
Loading…
Reference in New Issue