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
85280ec9
Commit
85280ec9
authored
Dec 17, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coverage for Transaction._prior_operation_failed.
parent
5663e952
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
transaction/tests/test__transaction.py
transaction/tests/test__transaction.py
+12
-0
No files found.
transaction/tests/test__transaction.py
View file @
85280ec9
...
...
@@ -104,6 +104,18 @@ class TransactionTests(unittest.TestCase):
self
.
assertTrue
(
t
.
isDoomed
())
self
.
assertEqual
(
t
.
status
,
Status
.
DOOMED
)
def
test__prior_operation_failed
(
self
):
from
transaction.tests.common
import
assertRaisesEx
from
transaction.interfaces
import
TransactionFailedError
class
_Traceback
(
object
):
def
getvalue
(
self
):
return
'TRACEBACK'
t
=
self
.
_makeOne
()
t
.
_failure_traceback
=
_Traceback
()
err
=
assertRaisesEx
(
TransactionFailedError
,
t
.
_prior_operation_failed
)
self
.
assertTrue
(
str
(
err
).
startswith
(
'An operation previously failed'
))
self
.
assertTrue
(
str
(
err
).
endswith
(
"with traceback:
\
n
\
n
TRACEBACK"
))
def
test_note
(
self
):
t
=
self
.
_makeOne
()
try
:
...
...
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