7 class WithNM(unittest
.TestCase
):
8 def callIt(self
, params
):
9 cmd
= sys
.path
[0] + '/../cnetworkmanager'
10 p
= subprocess
.Popen([cmd
, params
], stdout
=subprocess
.PIPE
, stderr
=subprocess
.STDOUT
)
11 o
= p
.communicate()[0]
12 # TODO print it if verbose
14 raise Exception("Command failed with status", p
.returncode
, o
)
20 self
.callIt("--actcon")
23 self
.callIt("--usrcon")
26 self
.callIt("--syscon")
34 if __name__
== '__main__':