From: Brian Warner Date: Tue, 9 Jan 2007 08:58:50 +0000 (-0700) Subject: workqueue: more tests X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~380 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/%22doc.html/something?a=commitdiff_plain;h=aad0a9dfac9ab041b058a0bc1cec6f17166002a6;p=tahoe-lafs%2Ftahoe-lafs.git workqueue: more tests --- diff --git a/src/allmydata/test/test_workqueue.py b/src/allmydata/test/test_workqueue.py index 8d9c3e97..b2b20307 100644 --- a/src/allmydata/test/test_workqueue.py +++ b/src/allmydata/test/test_workqueue.py @@ -147,11 +147,17 @@ class Items(unittest.TestCase): f.write("stuff") f.close() self.failUnless(os.path.exists(tmpfilename)) + # likewise this unreferenced box should get deleted + boxname = wq.create_boxname() + wq.write_to_box(boxname, "contents of box") + boxfile = os.path.join(wq.boxesdir, boxname) + self.failUnless(os.path.exists(boxfile)) d = wq.run_all_steps() def _check(res): self.failUnlessEqual(len(wq.dispatched_steps), 5) self.failUnlessEqual(wq.dispatched_steps[0][0], "upload_chk") self.failIf(os.path.exists(tmpfilename)) + self.failIf(os.path.exists(boxfile)) d.addCallback(_check) return d