Skip to content

Commit

Permalink
test ArgumentTypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
rjt-gupta committed Mar 13, 2019
1 parent a51448f commit 08d12f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions snare/tests/test_parse_timeout.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import unittest
from argparse import ArgumentTypeError

from snare.utils.snare_helpers import parse_timeout, str_to_bool


Expand All @@ -21,3 +23,6 @@ def test_str_to_bool(self):
assert str_to_bool(self.v) is True
self.v = 'false'
assert str_to_bool(self.v) is False

with self.assertRaises(ArgumentTypeError):
str_to_bool('twz')

0 comments on commit 08d12f7

Please sign in to comment.