mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-09 06:22:38 +00:00
change assertTrue -> assertEquals for non bools
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
This commit is contained in:
parent
26419c40bc
commit
54c032d0d7
@ -241,7 +241,7 @@ class Problems(GridTestMixin, AsyncTestCase, testutil.ShouldFailMixin):
|
||||
# that ought to work
|
||||
def _got_node(n):
|
||||
d = n.download_best_version()
|
||||
d.addCallback(lambda res: self.assertTrue(res, b"contents 1"))
|
||||
d.addCallback(lambda res: self.assertEquals(res, b"contents 1"))
|
||||
# now break the second peer
|
||||
def _break_peer1(res):
|
||||
self.g.break_server(self.server1.get_serverid())
|
||||
@ -249,7 +249,7 @@ class Problems(GridTestMixin, AsyncTestCase, testutil.ShouldFailMixin):
|
||||
d.addCallback(lambda res: n.overwrite(MutableData(b"contents 2")))
|
||||
# that ought to work too
|
||||
d.addCallback(lambda res: n.download_best_version())
|
||||
d.addCallback(lambda res: self.assertTrue(res, b"contents 2"))
|
||||
d.addCallback(lambda res: self.assertEquals(res, b"contents 2"))
|
||||
def _explain_error(f):
|
||||
print(f)
|
||||
if f.check(NotEnoughServersError):
|
||||
@ -281,7 +281,7 @@ class Problems(GridTestMixin, AsyncTestCase, testutil.ShouldFailMixin):
|
||||
d = nm.create_mutable_file(MutableData(b"contents 1"))
|
||||
def _created(n):
|
||||
d = n.download_best_version()
|
||||
d.addCallback(lambda res: self.assertTrue(res, b"contents 1"))
|
||||
d.addCallback(lambda res: self.assertEquals(res, b"contents 1"))
|
||||
# now break one of the remaining servers
|
||||
def _break_second_server(res):
|
||||
self.g.break_server(peerids[1])
|
||||
@ -289,7 +289,7 @@ class Problems(GridTestMixin, AsyncTestCase, testutil.ShouldFailMixin):
|
||||
d.addCallback(lambda res: n.overwrite(MutableData(b"contents 2")))
|
||||
# that ought to work too
|
||||
d.addCallback(lambda res: n.download_best_version())
|
||||
d.addCallback(lambda res: self.assertTrue(res, b"contents 2"))
|
||||
d.addCallback(lambda res: self.assertEquals(res, b"contents 2"))
|
||||
return d
|
||||
d.addCallback(_created)
|
||||
return d
|
||||
|
@ -229,7 +229,7 @@ class Repair(AsyncTestCase, PublishMixin, ShouldFailMixin):
|
||||
new_versionid = smap.best_recoverable_version()
|
||||
self.assertThat(new_versionid[0], Equals(5)) # seqnum 5
|
||||
d2 = self._fn.download_version(smap, new_versionid)
|
||||
d2.addCallback(self.assertTrue, expected_contents)
|
||||
d2.addCallback(self.assertEquals, expected_contents)
|
||||
return d2
|
||||
d.addCallback(_check_smap)
|
||||
return d
|
||||
|
Loading…
Reference in New Issue
Block a user