[CalendarServer-changes] [6953] CalendarServer/branches/users/glyph/dalify/txdav/caldav
source_changes at macosforge.org
source_changes at macosforge.org
Wed Feb 16 06:29:58 PST 2011
Revision: 6953
http://trac.macosforge.org/projects/calendarserver/changeset/6953
Author: glyph at apple.com
Date: 2011-02-16 06:29:57 -0800 (Wed, 16 Feb 2011)
Log Message:
-----------
interfaces and basic tests for quota used value
Modified Paths:
--------------
CalendarServer/branches/users/glyph/dalify/txdav/caldav/datastore/test/common.py
CalendarServer/branches/users/glyph/dalify/txdav/caldav/icalendarstore.py
Modified: CalendarServer/branches/users/glyph/dalify/txdav/caldav/datastore/test/common.py
===================================================================
--- CalendarServer/branches/users/glyph/dalify/txdav/caldav/datastore/test/common.py 2011-02-16 14:29:46 UTC (rev 6952)
+++ CalendarServer/branches/users/glyph/dalify/txdav/caldav/datastore/test/common.py 2011-02-16 14:29:57 UTC (rev 6953)
@@ -811,6 +811,20 @@
@inlineCallbacks
+ def test_usedQuotaAdjustment(self):
+ """
+ Adjust used quota on the calendar home and then verify that it's used.
+ """
+ home = yield self.homeUnderTest()
+ initialQuota = yield home.quotaUsedBytes()
+ yield home.adjustQuotaUsedBytes(30)
+ yield self.commit()
+ home2 = yield self.homeUnderTest()
+ afterQuota = yield home2.quotaUsedBytes()
+ self.assertEqual(afterQuota - initialQuota, 30)
+
+
+ @inlineCallbacks
def test_component(self):
"""
L{ICalendarObject.component} returns a L{VComponent} describing the
Modified: CalendarServer/branches/users/glyph/dalify/txdav/caldav/icalendarstore.py
===================================================================
--- CalendarServer/branches/users/glyph/dalify/txdav/caldav/icalendarstore.py 2011-02-16 14:29:46 UTC (rev 6952)
+++ CalendarServer/branches/users/glyph/dalify/txdav/caldav/icalendarstore.py 2011-02-16 14:29:57 UTC (rev 6953)
@@ -173,7 +173,19 @@
"""
+ def quotaUsedBytes():
+ """
+ The number of bytes counted towards the user's quota.
+ """
+
+ def adjustQuotaUsedBytes(delta):
+ """
+ Increase the number of bytes that count towards the user's quota.
+ """
+
+
+
class ICalendar(INotifier, IShareableCollection, IDataStoreResource):
"""
Calendar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110216/c5c6cb4c/attachment.html>
More information about the calendarserver-changes
mailing list