[test] Use --short-description when testing newcube command
authorDenis Laxalde <denis.laxalde@logilab.fr>
Wed, 26 Jun 2019 12:35:25 +0200
changeset 12662 4b612e5b9d05
parent 12661 3bbfd5e54c76
child 12663 853e73456d0f
[test] Use --short-description when testing newcube command
cubicweb/devtools/test/unittest_devctl.py
--- a/cubicweb/devtools/test/unittest_devctl.py	Mon Jun 17 17:23:36 2019 +0200
+++ b/cubicweb/devtools/test/unittest_devctl.py	Wed Jun 26 12:35:25 2019 +0200
@@ -26,10 +26,11 @@
 
 
 def newcube(directory, name):
-    cmd = ['cubicweb-ctl', 'newcube', '--directory', directory, name]
+    cmd = ['cubicweb-ctl', 'newcube', '--directory', directory,
+           '--short-description', 'short_desc', name]
     proc = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=STDOUT)
-    stdout, _ = proc.communicate(b'short_desc\n')
-    return proc.returncode, stdout
+    returncode = proc.wait()
+    return returncode, proc.stdout.read()
 
 
 def to_unicode(msg):