[CalendarServer-changes] [9114] CalendarServer/trunk/calendarserver/tools/shell/test/test_vfs.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Apr 13 18:12:54 PDT 2012
Revision: 9114
http://trac.macosforge.org/projects/calendarserver/changeset/9114
Author: wsanchez at apple.com
Date: 2012-04-13 18:12:53 -0700 (Fri, 13 Apr 2012)
Log Message:
-----------
Update tests for change to ListEntry()
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/shell/test/test_vfs.py
Modified: CalendarServer/trunk/calendarserver/tools/shell/test/test_vfs.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/shell/test/test_vfs.py 2012-04-14 01:06:18 UTC (rev 9113)
+++ CalendarServer/trunk/calendarserver/tools/shell/test/test_vfs.py 2012-04-14 01:12:53 UTC (rev 9114)
@@ -24,20 +24,20 @@
class TestListEntry(twisted.trial.unittest.TestCase):
def test_toString(self):
- self.assertEquals(ListEntry(File , "thingo" ).toString(), "thingo" )
- self.assertEquals(ListEntry(File , "thingo", Foo="foo").toString(), "thingo" )
- self.assertEquals(ListEntry(Folder, "thingo" ).toString(), "thingo/")
- self.assertEquals(ListEntry(Folder, "thingo", Foo="foo").toString(), "thingo/")
+ self.assertEquals(ListEntry(None, File , "thingo" ).toString(), "thingo" )
+ self.assertEquals(ListEntry(None, File , "thingo", Foo="foo").toString(), "thingo" )
+ self.assertEquals(ListEntry(None, Folder, "thingo" ).toString(), "thingo/")
+ self.assertEquals(ListEntry(None, Folder, "thingo", Foo="foo").toString(), "thingo/")
def test_fieldNamesImplicit(self):
# This test assumes File doesn't set list.fieldNames.
assert not hasattr(File.list, "fieldNames")
- self.assertEquals(set(ListEntry(File, "thingo").fieldNames), set(("Name",)))
+ self.assertEquals(set(ListEntry(File(None, ()), File, "thingo").fieldNames), set(("Name",)))
def test_fieldNamesExplicit(self):
def fieldNames(fileClass):
- return ListEntry(fileClass, "thingo", Flavor="Coconut", Style="Hard")
+ return ListEntry(fileClass(None, ()), fileClass, "thingo", Flavor="Coconut", Style="Hard")
# Full list
class MyFile(File):
@@ -69,13 +69,13 @@
# Name first, rest sorted by field name
self.assertEquals(
- tuple(ListEntry(File, "thingo", Flavor="Coconut", Style="Hard").toFields()),
+ tuple(ListEntry(File(None, ()), File, "thingo", Flavor="Coconut", Style="Hard").toFields()),
("thingo", "Coconut", "Hard")
)
def test_toFieldsExplicit(self):
def fields(fileClass):
- return tuple(ListEntry(fileClass, "thingo", Flavor="Coconut", Style="Hard").toFields())
+ return tuple(ListEntry(fileClass(None, ()), fileClass, "thingo", Flavor="Coconut", Style="Hard").toFields())
# Full list
class MyFile(File):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120413/6565d281/attachment-0001.html>
More information about the calendarserver-changes
mailing list