Created
March 20, 2015 03:10
-
-
Save moshez/6513b2f55211defcf9f4 to your computer and use it in GitHub Desktop.
Patch for thing
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
(env)moshez@mcgyver:~/src/ncolony$ git diff -r 196c8dd | |
diff --git a/ncolony/tests/test_ctllib.py b/ncolony/tests/test_ctllib.py | |
index 5ff4514..b9a24cf 100644 | |
--- a/ncolony/tests/test_ctllib.py | |
+++ b/ncolony/tests/test_ctllib.py | |
@@ -70,6 +70,16 @@ class TestArgParsing(unittest.TestCase): | |
self.assertEquals(res.gid, 6) | |
self.assertIs(res.func, ctllib.add) | |
+ def test_port(self): | |
+ res = self.parser.parse_args(self.base+['add', 'hello', '--cmd', '/bin/echo', | |
+ '--arg', 'hello', '--arg-port']) | |
+ self.assertEquals(res.name, 'hello') | |
+ self.assertEquals(res.cmd, '/bin/echo') | |
+ hello, port = res.args | |
+ self.assertEquals(hello, 'hello') | |
+ self.assertIsInstance(port, ctllib.Port) | |
+ self.assertEquals(port.idx, 0) | |
+ | |
def test_remove(self): | |
"""Check remove subcommand parsing""" | |
res = self.parser.parse_args(self.base+['remove', 'hello']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment