[Telepathy-commits] [telepathy-salut/master] check that TransferredBytes is 0 if a file sending failed
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Thu Nov 6 07:08:32 PST 2008
---
tests/twisted/avahi/test-send-file-declined.py | 4 ++++
.../twisted/avahi/test-send-file-item-not-found.py | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/tests/twisted/avahi/test-send-file-declined.py b/tests/twisted/avahi/test-send-file-declined.py
index 58f88f2..6b7ca9c 100644
--- a/tests/twisted/avahi/test-send-file-declined.py
+++ b/tests/twisted/avahi/test-send-file-declined.py
@@ -191,6 +191,10 @@ def test(q, bus, conn):
assert state == FT_STATE_CANCELLED, state
assert reason == FT_STATE_CHANGE_REASON_REMOTE_STOPPED
+ transferred = ft_props.Get(CHANNEL_TYPE_FILE_TRANSFER, 'TransferredBytes')
+ # no byte has been transferred as the file was declined
+ assert transferred == 0
+
channel.Close()
q.expect('dbus-signal', signal='Closed')
diff --git a/tests/twisted/avahi/test-send-file-item-not-found.py b/tests/twisted/avahi/test-send-file-item-not-found.py
index 6c6683d..095dd5b 100644
--- a/tests/twisted/avahi/test-send-file-item-not-found.py
+++ b/tests/twisted/avahi/test-send-file-item-not-found.py
@@ -191,6 +191,10 @@ def test(q, bus, conn):
assert state == FT_STATE_CANCELLED, state
assert reason == FT_STATE_CHANGE_REASON_REMOTE_ERROR
+ transferred = ft_props.Get(CHANNEL_TYPE_FILE_TRANSFER, 'TransferredBytes')
+ # no byte has been transferred as the transfer failed
+ assert transferred == 0
+
channel.Close()
q.expect('dbus-signal', signal='Closed')
--
1.5.6.5
More information about the Telepathy-commits
mailing list