Skip to content

Commit

Permalink
Add one unit test case
Browse files Browse the repository at this point in the history
  • Loading branch information
jinpingh committed Feb 11, 2019
1 parent 22699f7 commit fdc0124
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions orquesta/tests/unit/utils/test_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ def test_parse_empty_string(self):
def test_parse_null_type(self):
self.assertListEqual(params.parse_inline_params(None), [])

def test_parse_bool_input(self):
tests = [
('x=true', [{'x': True}]),
('y=True', [{'y': True}]),
('c=TRUE', [{'c': True}]),
('x=false', [{'x': False}]),
('y=False', [{'y': False}]),
('c=FALSE', [{'c': False}])
]

for s, d in tests:
self.assertListEqual(params.parse_inline_params(s), d)

def test_parse_other_types(self):
self.assertListEqual(params.parse_inline_params(123), [])
self.assertListEqual(params.parse_inline_params(True), [])
Expand Down

0 comments on commit fdc0124

Please sign in to comment.