forked from jina-ai/serve
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,18 @@ | ||
import unittest | ||
from tests import JinaTestCase | ||
from jina.main.parser import set_client_cli_parser | ||
from jina.helper import get_parsed_args | ||
|
||
|
||
class MyTestCase(JinaTestCase): | ||
def test_get_parsed_args_parse_list(self): | ||
kwargs = {'filter-by': ['a', 'b']} | ||
parser = set_client_cli_parser() | ||
args, p_args, un_args = get_parsed_args(kwargs, parser) | ||
self.assertEqual(len(args), 3) | ||
self.assertEqual(len(p_args.filter_by), 2) | ||
self.assertEqual(len(un_args), 0) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |