From 6b9899ade1e572aff03738494b5b65a232d0b731 Mon Sep 17 00:00:00 2001 From: Zooko O'Whielacronx Date: Sat, 11 Apr 2009 19:17:42 -0700 Subject: [PATCH] trivial: remove trailing whitespace and unused import --- src/allmydata/test/test_dirnode.py | 12 ++++++------ src/allmydata/web/directory.py | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/allmydata/test/test_dirnode.py b/src/allmydata/test/test_dirnode.py index 25e8c465..6cd80ecd 100644 --- a/src/allmydata/test/test_dirnode.py +++ b/src/allmydata/test/test_dirnode.py @@ -479,7 +479,7 @@ class Dirnode(unittest.TestCase, {"key": "value"})) d.addCallback(lambda res: n.get_metadata_for(u"c4")) d.addCallback(lambda metadata: - self.failUnless((set(metadata.keys()) == set(["key", "tahoe"])) and + self.failUnless((set(metadata.keys()) == set(["key", "tahoe"])) and (metadata['key'] == "value"), metadata)) d.addCallback(lambda res: n.delete(u"c2")) @@ -511,7 +511,7 @@ class Dirnode(unittest.TestCase, {"key": "value"})) d.addCallback(lambda res: n.get_metadata_for(u"d4")) d.addCallback(lambda metadata: - self.failUnless((set(metadata.keys()) == set(["key", "tahoe"])) and + self.failUnless((set(metadata.keys()) == set(["key", "tahoe"])) and (metadata['key'] == "value"), metadata)) d.addCallback(lambda res: n.delete(u"d2")) @@ -539,11 +539,11 @@ class Dirnode(unittest.TestCase, self.failUnlessEqual(set(metadata.keys()), set(["tahoe", "ctime", "mtime"]))) d.addCallback(lambda res: n.get_metadata_for(u"e2")) - d.addCallback(lambda metadata: + d.addCallback(lambda metadata: self.failUnlessEqual(set(metadata.keys()), set(['tahoe']))) d.addCallback(lambda res: n.get_metadata_for(u"e3")) d.addCallback(lambda metadata: - self.failUnless((set(metadata.keys()) == set(["key", "tahoe"])) + self.failUnless((set(metadata.keys()) == set(["key", "tahoe"])) and (metadata['key'] == "value"), metadata)) d.addCallback(lambda res: n.delete(u"e1")) @@ -575,7 +575,7 @@ class Dirnode(unittest.TestCase, lambda metadata: self.failUnlessEqual(set(metadata.keys()), set(['tahoe']))) d.addCallback(lambda res: n.get_metadata_for(u"f3")) d.addCallback(lambda metadata: - self.failUnless((set(metadata.keys()) == set(["key", "tahoe"])) and + self.failUnless((set(metadata.keys()) == set(["key", "tahoe"])) and (metadata['key'] == "value"), metadata)) d.addCallback(lambda res: n.delete(u"f1")) @@ -683,7 +683,7 @@ class Dirnode(unittest.TestCase, self.failUnless(IFileNode.providedBy(newnode))) d.addCallback(lambda res: n.get_metadata_for(u"newfile-metadata")) d.addCallback(lambda metadata: - self.failUnless((set(metadata.keys()) == set(["key", "tahoe"])) and + self.failUnless((set(metadata.keys()) == set(["key", "tahoe"])) and (metadata['key'] == "value"), metadata)) d.addCallback(lambda res: n.delete(u"newfile-metadata")) diff --git a/src/allmydata/web/directory.py b/src/allmydata/web/directory.py index e2fb1c1e..8da7a33f 100644 --- a/src/allmydata/web/directory.py +++ b/src/allmydata/web/directory.py @@ -1,7 +1,6 @@ import simplejson import urllib -import time from zope.interface import implements from twisted.internet import defer -- 2.45.2