[gvfs] gvfs-test: Fix communication with gvfs CLI tool



commit 8f0ffa1f5b8c541f30d73b99aee8e2aab574c28d
Author: Martin Pitt <martinpitt gnome org>
Date:   Wed May 29 15:29:20 2013 +0200

    gvfs-test: Fix communication with gvfs CLI tool
    
    Flush the stdin stream to "gvfs-mount" after writing to it. Apparently Python
    3.3's buffering behaviour has changed to require this now.

 test/gvfs-test |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/test/gvfs-test b/test/gvfs-test
index 00b846a..008e3be 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -572,10 +572,12 @@ class Ftp(GvfsTestCase):
         # wrong user name
         self.wait_for_gvfs_mount_user_prompt(mount)
         mount.stdin.write(b'eve\nh4ck\n')
+        mount.stdin.flush()
 
         # wrong password name
         self.wait_for_gvfs_mount_user_prompt(mount)
         mount.stdin.write(b'testuser\nh4ck\n')
+        mount.stdin.flush()
 
         # correct credentials
         self.wait_for_gvfs_mount_user_prompt(mount)
@@ -1415,6 +1417,7 @@ DAVLockDB DAVLock
         # wrong password
         self.wait_for_gvfs_mount_user_prompt(mount)
         mount.stdin.write(b'test\nh4ck\n')
+        mount.stdin.flush()
 
         # correct password
         (out, err) = mount.communicate(b's3kr1t\n')
@@ -1436,6 +1439,7 @@ DAVLockDB DAVLock
         # wrong password
         self.wait_for_gvfs_mount_user_prompt(mount)
         mount.stdin.write(b'test\nh4ck\n')
+        mount.stdin.flush()
 
         # correct password
         (out, err) = mount.communicate(b's3kr1t\n')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]