Commit 809297e4 authored by Łukasz Nowak's avatar Łukasz Nowak

Share method in base mixing.

parent 7def795f
...@@ -53,6 +53,10 @@ class VifibSlaposRestAPIV1MixinBase(TestVifibSlapWebServiceMixin): ...@@ -53,6 +53,10 @@ class VifibSlaposRestAPIV1MixinBase(TestVifibSlapWebServiceMixin):
return str(self.getPortalObject().portal_ids.generateNewId( return str(self.getPortalObject().portal_ids.generateNewId(
id_group=('slapos_rest_api_v1_test'))) id_group=('slapos_rest_api_v1_test')))
def cloneByPath(self, path):
return self.portal.restrictedTraverse(path).Base_createCloneDocument(
batch_mode=1)
def assertCacheControlHeader(self): def assertCacheControlHeader(self):
self.assertEqual('must-revalidate', self.assertEqual('must-revalidate',
self.response.getheader('Cache-Control')) self.response.getheader('Cache-Control'))
...@@ -133,10 +137,6 @@ class VifibSlaposRestAPIV1Mixin(VifibSlaposRestAPIV1MixinBase): ...@@ -133,10 +137,6 @@ class VifibSlaposRestAPIV1Mixin(VifibSlaposRestAPIV1MixinBase):
if os.path.exists(self.person_request_simulator): if os.path.exists(self.person_request_simulator):
os.unlink(self.person_request_simulator) os.unlink(self.person_request_simulator)
def cloneByPath(self, path):
return self.portal.restrictedTraverse(path).Base_createCloneDocument(
batch_mode=1)
def assertPersonRequestSimulatorEmpty(self): def assertPersonRequestSimulatorEmpty(self):
self.assertEqual(open(self.person_request_simulator).read(), '') self.assertEqual(open(self.person_request_simulator).read(), '')
......
56 57
\ No newline at end of file \ No newline at end of file
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