[CalendarServer-changes] [13161] CalendarServer/branches/users/sagen/move2who-5

source_changes at macosforge.org source_changes at macosforge.org
Fri Apr 4 11:48:29 PDT 2014


Revision: 13161
          http://trac.calendarserver.org//changeset/13161
Author:   sagen at apple.com
Date:     2014-04-04 11:48:29 -0700 (Fri, 04 Apr 2014)
Log Message:
-----------
Fix purge test

Modified Paths:
--------------
    CalendarServer/branches/users/sagen/move2who-5/calendarserver/tools/purge.py
    CalendarServer/branches/users/sagen/move2who-5/calendarserver/tools/test/test_purge.py
    CalendarServer/branches/users/sagen/move2who-5/twistedcaldav/directory/test/accounts.xml

Modified: CalendarServer/branches/users/sagen/move2who-5/calendarserver/tools/purge.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-5/calendarserver/tools/purge.py	2014-04-04 17:47:56 UTC (rev 13160)
+++ CalendarServer/branches/users/sagen/move2who-5/calendarserver/tools/purge.py	2014-04-04 18:48:29 UTC (rev 13161)
@@ -29,7 +29,6 @@
 from twisted.internet.defer import inlineCallbacks, returnValue
 
 from twistedcaldav import caldavxml
-# from twistedcaldav.directory.directory import DirectoryRecord
 
 from txdav.caldav.datastore.query.filter import Filter
 
@@ -731,6 +730,7 @@
 
         # Does the record exist?
         record = yield self.directory.recordWithUID(uid)
+        # MOVE2WHO
         # if record is None:
             # The user has already been removed from the directory service.  We
             # need to fashion a temporary, fake record
@@ -768,7 +768,7 @@
         yield self._removeCalendarHome(uid)
 
         # Remove VCards
-        count += yield self._removeAddressbookHome(uid)
+        count += (yield self._removeAddressbookHome(uid))
 
         if self.proxies and not self.dryrun:
             if self.verbose:

Modified: CalendarServer/branches/users/sagen/move2who-5/calendarserver/tools/test/test_purge.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-5/calendarserver/tools/test/test_purge.py	2014-04-04 17:47:56 UTC (rev 13160)
+++ CalendarServer/branches/users/sagen/move2who-5/calendarserver/tools/test/test_purge.py	2014-04-04 18:48:29 UTC (rev 13161)
@@ -768,7 +768,7 @@
 DTSTART;TZID=US/Pacific:20100304T120000
 DTSTAMP:20100303T195203Z
 SEQUENCE:2
-X-APPLE-DROPBOX:/calendars/__uids__/C76DB741-5A2A-4239-8112-10CF152AFCA4/dropbox/F2F14D94-B944-43D9-8F6F-97F95B2764CA.dropbox
+X-APPLE-DROPBOX:/calendars/__uids__/6423F94A-6B76-4A3A-815B-D52CFD77935D/dropbox/F2F14D94-B944-43D9-8F6F-97F95B2764CA.dropbox
 END:VEVENT
 END:VCALENDAR
 """.replace("\n", "\r\n")
@@ -798,8 +798,8 @@
     """
     Tests for purging the data belonging to a given principal
     """
-    uid = "C76DB741-5A2A-4239-8112-10CF152AFCA4"
-    uid2 = "FFED7B62-2E08-496E-BD32-B2F95FFDDB6B"
+    uid = "6423F94A-6B76-4A3A-815B-D52CFD77935D"
+    uid2 = "37DB0C90-4DB1-4932-BC69-3DAB66F374F5"
 
     metadata = {
         "accessMode": "PUBLIC",

Modified: CalendarServer/branches/users/sagen/move2who-5/twistedcaldav/directory/test/accounts.xml
===================================================================
--- CalendarServer/branches/users/sagen/move2who-5/twistedcaldav/directory/test/accounts.xml	2014-04-04 17:47:56 UTC (rev 13160)
+++ CalendarServer/branches/users/sagen/move2who-5/twistedcaldav/directory/test/accounts.xml	2014-04-04 18:48:29 UTC (rev 13161)
@@ -63,24 +63,15 @@
     <full-name>Double "quotey" Quotes</full-name>
     <email>doublequotes at example.com</email>
   </record>
-
+  <user>
+    <short-name>purgeuser</short-name>
+    <uid>37DB0C90-4DB1-4932-BC69-3DAB66F374F5</uid>
+    <guid>37DB0C90-4DB1-4932-BC69-3DAB66F374F5</guid>
+    <password>purgeuser</password>
+    <name>Purge User</name>
+    <email-address>purgeuser at example.com</email-address>
+  </user>
   <record type="user">
-    <short-name>purge1</short-name>
-    <uid>C76DB741-5A2A-4239-8112-10CF152AFCA4</uid>
-    <guid>C76DB741-5A2A-4239-8112-10CF152AFCA4</guid>
-    <password>purge1</password>
-    <full-name>purge1</full-name>
-    <email>purge1 at example.com</email>
-  </record>
-  <record type="user">
-    <short-name>purge2</short-name>
-    <uid>FFED7B62-2E08-496E-BD32-B2F95FFDDB6B</uid>
-    <guid>FFED7B62-2E08-496E-BD32-B2F95FFDDB6B</guid>
-    <password>purge2</password>
-    <full-name>purge2</full-name>
-    <email>purge2 at example.com</email>
-  </record>
-  <record type="user">
     <short-name>home1</short-name>
     <uid>home1</uid>
     <password>home1</password>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140404/20de457c/attachment-0001.html>


More information about the calendarserver-changes mailing list