Skip to content
Browse files

Correct BackendSelection test that were not actually asserting anything.

  • Loading branch information...
1 parent 2ea495b commit 26c0c7970f24ec867413c95942e39e9cd7715bbf @allenap committed Jul 25, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 tftp/test/test_backend.py
View
9 tftp/test/test_backend.py
@@ -5,6 +5,7 @@
FilesystemWriter, IReader, IWriter)
from tftp.errors import Unsupported, AccessViolation, FileNotFound, FileExists
from twisted.python.filepath import FilePath
+from twisted.internet.defer import inlineCallbacks
from twisted.trial import unittest
import os.path
import shutil
@@ -24,13 +25,17 @@ def setUp(self):
with open(self.existing_file_name, 'w') as f:
f.write(self.test_data)
+ @inlineCallbacks
def test_read_supported_by_default(self):
b = FilesystemSynchronousBackend(self.temp_dir)
- return b.get_reader('foo').addCallback(IReader.providedBy)
+ reader = yield b.get_reader('foo')
+ self.assertTrue(IReader.providedBy(reader))
+ @inlineCallbacks
def test_write_supported_by_default(self):
b = FilesystemSynchronousBackend(self.temp_dir)
- return b.get_writer('bar').addCallback(IWriter.providedBy)
+ writer = yield b.get_writer('bar')
+ self.assertTrue(IWriter.providedBy(writer))
def test_read_unsupported(self):
b = FilesystemSynchronousBackend(self.temp_dir, can_read=False)

0 comments on commit 26c0c79

Please sign in to comment.
Something went wrong with that request. Please try again.