From aad0a9dfac9ab041b058a0bc1cec6f17166002a6 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 9 Jan 2007 01:58:50 -0700 Subject: [PATCH] workqueue: more tests --- src/allmydata/test/test_workqueue.py | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.45.2