-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made sure the VersionHistory.BranchInfo class fulfill the API, provid…
…ing a getId method. Added missing security declarations.
- Loading branch information
Showing
3 changed files
with
60 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
############################################################################## | ||
# | ||
# Copyright (c) 2001 Zope Foundation and Contributors. | ||
# | ||
# This software is subject to the provisions of the Zope Public License, | ||
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution. | ||
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
# FOR A PARTICULAR PURPOSE | ||
# | ||
############################################################################## | ||
"""Test the VersionHistory internals. | ||
$Id$ | ||
""" | ||
import unittest | ||
|
||
from common import common_setUp | ||
from common import common_tearDown | ||
|
||
|
||
class VersionHistoryTests(unittest.TestCase): | ||
|
||
setUp = common_setUp | ||
tearDown = common_tearDown | ||
|
||
def testBranchHaveName(self): | ||
self.repository.applyVersionControl(self.document1) | ||
info = self.repository.getVersionInfo(self.document1) | ||
history = self.repository.getVersionHistory(info.history_id) | ||
branch = history.createBranch('foo', None) | ||
self.assertEqual(branch.getId(), 'foo') | ||
|
||
|
||
def test_suite(): | ||
suite = unittest.TestSuite() | ||
suite.addTest(unittest.makeSuite(VersionHistoryTests)) | ||
return suite | ||
|
||
if __name__ == '__main__': | ||
unittest.main(defaultTest='test_suite') |