summaryrefslogtreecommitdiff
path: root/tests/twisted/avahi/file-transfer/test-send-file-item-not-found.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/twisted/avahi/file-transfer/test-send-file-item-not-found.py')
-rw-r--r--tests/twisted/avahi/file-transfer/test-send-file-item-not-found.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/twisted/avahi/file-transfer/test-send-file-item-not-found.py b/tests/twisted/avahi/file-transfer/test-send-file-item-not-found.py
index bcf8cbdc..fdbbb645 100644
--- a/tests/twisted/avahi/file-transfer/test-send-file-item-not-found.py
+++ b/tests/twisted/avahi/file-transfer/test-send-file-item-not-found.py
@@ -1,9 +1,10 @@
from saluttest import exec_test
-from file_transfer_helper import SendFileTest, FT_STATE_CANCELLED, \
- FT_STATE_CHANGE_REASON_REMOTE_ERROR, CHANNEL_TYPE_FILE_TRANSFER
+from file_transfer_helper import SendFileTest
from twisted.words.xish import domish
+import constants as cs
+
class SendFileItemNotFound(SendFileTest):
def client_request_file(self):
# Receiver can't retrieve the file
@@ -24,10 +25,10 @@ class SendFileItemNotFound(SendFileTest):
e = self.q.expect('dbus-signal', signal='FileTransferStateChanged')
state, reason = e.args
- assert state == FT_STATE_CANCELLED, state
- assert reason == FT_STATE_CHANGE_REASON_REMOTE_ERROR
+ assert state == cs.FT_STATE_CANCELLED, state
+ assert reason == cs.FT_STATE_CHANGE_REASON_REMOTE_ERROR
- transferred = self.ft_props.Get(CHANNEL_TYPE_FILE_TRANSFER, 'TransferredBytes')
+ transferred = self.ft_props.Get(cs.CHANNEL_TYPE_FILE_TRANSFER, 'TransferredBytes')
# no byte has been transferred as the transfer failed
assert transferred == 0