-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic tests for new sparse sub-commands.
- Loading branch information
1 parent
343f9c9
commit b05bfc1
Showing
3 changed files
with
69 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from __future__ import absolute_import, unicode_literals | ||
|
||
import argparse | ||
import unittest | ||
|
||
from streamparse.cli.jar import subparser_hook | ||
|
||
from nose.tools import ok_ | ||
|
||
|
||
class JARTestCase(unittest.TestCase): | ||
|
||
def test_subparser_hook(self): | ||
parser = argparse.ArgumentParser() | ||
subparsers = parser.add_subparsers() | ||
subparser_hook(subparsers) | ||
|
||
subcommands = parser._optionals._actions[1].choices.keys() | ||
ok_('jar' in subcommands) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
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,23 @@ | ||
from __future__ import absolute_import, unicode_literals | ||
|
||
import argparse | ||
import unittest | ||
|
||
from streamparse.cli.remove_logs import subparser_hook | ||
|
||
from nose.tools import ok_ | ||
|
||
|
||
class RemoveLogsTestCase(unittest.TestCase): | ||
|
||
def test_subparser_hook(self): | ||
parser = argparse.ArgumentParser() | ||
subparsers = parser.add_subparsers() | ||
subparser_hook(subparsers) | ||
|
||
subcommands = parser._optionals._actions[1].choices.keys() | ||
ok_('remove_logs' in subcommands) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
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,23 @@ | ||
from __future__ import absolute_import, unicode_literals | ||
|
||
import argparse | ||
import unittest | ||
|
||
from streamparse.cli.update_virtualenv import subparser_hook | ||
|
||
from nose.tools import ok_ | ||
|
||
|
||
class UpdateVirtualenvTestCase(unittest.TestCase): | ||
|
||
def test_subparser_hook(self): | ||
parser = argparse.ArgumentParser() | ||
subparsers = parser.add_subparsers() | ||
subparser_hook(subparsers) | ||
|
||
subcommands = parser._optionals._actions[1].choices.keys() | ||
ok_('update_virtualenv' in subcommands) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |