[CalendarServer-changes] [7675] CalendarServer/branches/users/glyph/uidexport/calendarserver/tools

source_changes at macosforge.org source_changes at macosforge.org
Mon Jun 27 13:34:33 PDT 2011


Revision: 7675
          http://trac.macosforge.org/projects/calendarserver/changeset/7675
Author:   glyph at apple.com
Date:     2011-06-27 13:34:32 -0700 (Mon, 27 Jun 2011)
Log Message:
-----------
Failing test for UIDExporter

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/export.py
    CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/test/test_export.py

Modified: CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/export.py
===================================================================
--- CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/export.py	2011-06-27 20:34:02 UTC (rev 7674)
+++ CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/export.py	2011-06-27 20:34:32 UTC (rev 7675)
@@ -145,6 +145,12 @@
 
 
 
+class UIDExporter(object):
+    """
+    """
+
+
+
 class DirectoryExporter(object):
     """
     An exporter that constructs a list of calendars based on the directory

Modified: CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/test/test_export.py
===================================================================
--- CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/test/test_export.py	2011-06-27 20:34:02 UTC (rev 7674)
+++ CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/test/test_export.py	2011-06-27 20:34:32 UTC (rev 7675)
@@ -35,7 +35,7 @@
 
 from calendarserver.tools import export
 from calendarserver.tools.export import ExportOptions, main
-from calendarserver.tools.export import DirectoryExporter
+from calendarserver.tools.export import DirectoryExporter, UIDExporter
 
 from twisted.python.filepath import FilePath
 from twistedcaldav.test.util import patchConfig
@@ -91,10 +91,10 @@
         self.assertEquals(len(err.getvalue()), 0)
 
 
-    def test_oneHome(self):
+    def test_oneRecord(self):
         """
-        One '--record' option will result in a single DirectoryExporter object
-        with no calendars in its list.
+        One '--record' option will result in a single L{DirectoryExporter}
+        object with no calendars in its list.
         """
         eo = ExportOptions()
         eo.parseOptions(["--record", "users:bob"])
@@ -106,6 +106,19 @@
         self.assertEquals(exp.collections, [])
 
 
+    def test_oneUID(self):
+        """
+        One '--uid' option will result in a single L{UIDExporter} object with no
+        calendars in its list.
+        """
+        eo = ExportOptions()
+        eo.parseOptions(["--uid", "bob's your guid"])
+        self.assertEquals(len(eo.exporters), 1)
+        exp = eo.exporters[0]
+        self.assertIsInstance(exp, UIDExporter)
+        self.assertEquals(exp.uid, "bob's your guid")
+
+
     def test_homeAndCollections(self):
         """
         The --collection option adds calendars to the last calendar that was
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110627/9ffa4724/attachment-0001.html>


More information about the calendarserver-changes mailing list