Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
transaction
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
transaction
Commits
13cbda69
Commit
13cbda69
authored
Dec 18, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Breakout kings.
parent
cd1a1adf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
23 deletions
+35
-23
transaction/tests/test__transaction.py
transaction/tests/test__transaction.py
+35
-23
No files found.
transaction/tests/test__transaction.py
View file @
13cbda69
...
@@ -1061,6 +1061,39 @@ class MultiObjectResourceAdapterTests(unittest.TestCase):
...
@@ -1061,6 +1061,39 @@ class MultiObjectResourceAdapterTests(unittest.TestCase):
self
.
assertTrue
(
jar
.
_x
)
self
.
assertTrue
(
jar
.
_x
)
class
Test_rm_key
(
unittest
.
TestCase
):
def
_callFUT
(
self
,
oid
):
from
transaction._transaction
import
rm_key
return
rm_key
(
oid
)
def
test_miss
(
self
):
self
.
assertTrue
(
self
.
_callFUT
(
object
())
is
None
)
def
test_hit
(
self
):
self
.
assertEqual
(
self
.
_callFUT
(
Resource
(
'zzz'
)),
'zzz'
)
class
Test_object_hint
(
unittest
.
TestCase
):
def
_callFUT
(
self
,
oid
):
from
transaction._transaction
import
object_hint
return
object_hint
(
oid
)
def
test_miss
(
self
):
class
_Test
(
object
):
pass
test
=
_Test
()
self
.
assertEqual
(
self
.
_callFUT
(
test
),
"_Test oid=None"
)
def
test_hit
(
self
):
class
_Test
(
object
):
pass
test
=
_Test
()
test
.
_p_oid
=
'OID'
self
.
assertEqual
(
self
.
_callFUT
(
test
),
"_Test oid='OID'"
)
class
Test_oid_repr
(
unittest
.
TestCase
):
class
Test_oid_repr
(
unittest
.
TestCase
):
def
_callFUT
(
self
,
oid
):
def
_callFUT
(
self
,
oid
):
...
@@ -1084,29 +1117,6 @@ class Test_oid_repr(unittest.TestCase):
...
@@ -1084,29 +1117,6 @@ class Test_oid_repr(unittest.TestCase):
class
MiscellaneousTests
(
unittest
.
TestCase
):
class
MiscellaneousTests
(
unittest
.
TestCase
):
def
test_rm_key_miss
(
self
):
from
transaction._transaction
import
rm_key
self
.
assertTrue
(
rm_key
(
object
())
is
None
)
def
test_rm_key_hit
(
self
):
from
transaction._transaction
import
rm_key
self
.
assertEqual
(
rm_key
(
Resource
(
'zzz'
)),
'zzz'
)
def
test_object_hint_miss
(
self
):
from
transaction._transaction
import
object_hint
class
_Test
(
object
):
pass
test
=
_Test
()
self
.
assertEqual
(
object_hint
(
test
),
"_Test oid=None"
)
def
test_object_hint_hit
(
self
):
from
transaction._transaction
import
object_hint
class
_Test
(
object
):
pass
test
=
_Test
()
test
.
_p_oid
=
'OID'
self
.
assertEqual
(
object_hint
(
test
),
"_Test oid='OID'"
)
def
test_BBB_join
(
self
):
def
test_BBB_join
(
self
):
# The join method is provided for "backward-compatability" with ZODB 4
# The join method is provided for "backward-compatability" with ZODB 4
# data managers.
# data managers.
...
@@ -1211,6 +1221,8 @@ def test_suite():
...
@@ -1211,6 +1221,8 @@ def test_suite():
return
unittest
.
TestSuite
((
return
unittest
.
TestSuite
((
unittest
.
makeSuite
(
TransactionTests
),
unittest
.
makeSuite
(
TransactionTests
),
unittest
.
makeSuite
(
MultiObjectResourceAdapterTests
),
unittest
.
makeSuite
(
MultiObjectResourceAdapterTests
),
unittest
.
makeSuite
(
Test_rm_key
),
unittest
.
makeSuite
(
Test_object_hint
),
unittest
.
makeSuite
(
Test_oid_repr
),
unittest
.
makeSuite
(
Test_oid_repr
),
unittest
.
makeSuite
(
MiscellaneousTests
),
unittest
.
makeSuite
(
MiscellaneousTests
),
))
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment