Commit caf4c9cf authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: test: use PinnedDateTime from mixin

parent 70560c2b
......@@ -6,24 +6,10 @@
##############################################################################
from erp5.component.test.testSlapOSERP5VirtualMasterScenario import TestSlapOSVirtualMasterScenarioMixin
from erp5.component.test.SlapOSTestCaseMixin import PinnedDateTime
from DateTime import DateTime
class PinnedDateTime(object):
"""
Context manager for changing the zope date
"""
def __init__(self, testinstance, datetime):
self.datetime = datetime
self.testinstance = testinstance
def __enter__(self):
self.testinstance.pinDateTime(self.datetime)
def __exit__(self, *args, **kw):
self.testinstance.unpinDateTime()
class TestSlapOSAccountingScenario(TestSlapOSVirtualMasterScenarioMixin):
def bootstrapAccountingTest(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment