[CalendarServer-changes] [15139] twext/trunk/twext/enterprise/jobs/test/test_jobs.py
source_changes at macosforge.org
source_changes at macosforge.org
Sun Sep 20 10:15:56 PDT 2015
Revision: 15139
http://trac.calendarserver.org//changeset/15139
Author: cdaboo at apple.com
Date: 2015-09-20 10:15:56 -0700 (Sun, 20 Sep 2015)
Log Message:
-----------
Fix work default changes tests to properly clear up after themselves.
Modified Paths:
--------------
twext/trunk/twext/enterprise/jobs/test/test_jobs.py
Modified: twext/trunk/twext/enterprise/jobs/test/test_jobs.py
===================================================================
--- twext/trunk/twext/enterprise/jobs/test/test_jobs.py 2015-09-20 16:57:41 UTC (rev 15138)
+++ twext/trunk/twext/enterprise/jobs/test/test_jobs.py 2015-09-20 17:15:56 UTC (rev 15139)
@@ -756,7 +756,20 @@
})
_validate(WORK_PRIORITY_LOW, WORK_WEIGHT_0)
+ # Back to default priority and weight again
+ WorkItem.updateWorkTypes({
+ "UPDATE_WORK_ITEM": {
+ "priority": WORK_PRIORITY_MEDIUM,
+ "weight": WORK_WEIGHT_5,
+ },
+ })
+ results = WorkItem.dumpWorkTypes()
+ self.assertEqual(
+ results["UPDATE_WORK_ITEM"],
+ {"priority": WORK_PRIORITY_MEDIUM, "weight": WORK_WEIGHT_5},
+ )
+
def test_dumpWorkTypes(self):
"""
L{workItem.dumpWorkTypes} dumps weight and priority correctly.
@@ -796,8 +809,21 @@
{"priority": WORK_PRIORITY_MEDIUM, "weight": WORK_WEIGHT_10},
)
+ # Back to default priority and weight again
+ WorkItem.updateWorkTypes({
+ "UPDATE_WORK_ITEM": {
+ "priority": WORK_PRIORITY_MEDIUM,
+ "weight": WORK_WEIGHT_5,
+ },
+ })
+ results = WorkItem.dumpWorkTypes()
+ self.assertEqual(
+ results["UPDATE_WORK_ITEM"],
+ {"priority": WORK_PRIORITY_MEDIUM, "weight": WORK_WEIGHT_5},
+ )
+
class WorkerConnectionPoolTests(TestCase):
"""
A L{WorkerConnectionPool} is responsible for managing, in a node's
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150920/c8e2c5cb/attachment-0001.html>
More information about the calendarserver-changes
mailing list