Permalink
Browse files

Fix failing tests

  • Loading branch information...
1 parent df484eb commit f434349b3e09b4e51ea3bda8e0ead68663a7d08a @shylent shylent committed Sep 24, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 tftp/test/test_backend.py
  2. +3 −3 tftp/test/test_bootstrap.py
@@ -95,7 +95,7 @@ def test_size(self):
def test_size_when_reader_finished(self):
r = FilesystemReader(self.temp_dir.child('foo'))
r.finish()
- self.assertIsNone(r.size)
+ self.assertTrue(r.size is None)
def test_size_when_file_removed(self):
# FilesystemReader.size uses fstat() to discover the file's size, so
@@ -135,14 +135,14 @@ def test_tsize_ignored_when_not_a_number(self):
self.s = MockSession()
opts = self.proto.processOptions(OrderedDict({'tsize':'foo'}))
self.proto.applyOptions(self.s, opts)
- self.assertIsNone(self.s.tsize)
+ self.assertTrue(self.s.tsize is None)
self.assertEqual(opts, OrderedDict({}))
def test_tsize_ignored_when_less_than_zero(self):
self.s = MockSession()
opts = self.proto.processOptions(OrderedDict({'tsize':'-1'}))
self.proto.applyOptions(self.s, opts)
- self.assertIsNone(self.s.tsize)
+ self.assertTrue(self.s.tsize is None)
self.assertEqual(opts, OrderedDict({}))
def test_multiple_options(self):
@@ -403,7 +403,7 @@ def test_option_tsize(self):
self.assertIsInstance(self.ws.session, WriteSession)
# Options are not applied to the WriteSession until the first DATA
# datagram is received,
- self.assertIsNone(self.ws.session.tsize)
+ self.assertTrue(self.ws.session.tsize is None)
self.ws.datagramReceived(
DATADatagram(1, 'foobarbaz').to_wire(), ('127.0.0.1', 65465))
# The tsize option has been applied to the WriteSession.

0 comments on commit f434349

Please sign in to comment.