Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
25c4c7f9
Commit
25c4c7f9
authored
Aug 28, 2015
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pep8 fix
parent
e70da5ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
tests/test_atomic_requests.py
+16
-8
No files found.
tests/test_atomic_requests.py
View file @
25c4c7f9
...
@@ -35,8 +35,10 @@ class APIExceptionView(APIView):
...
@@ -35,8 +35,10 @@ class APIExceptionView(APIView):
raise
APIException
raise
APIException
@unittest.skipUnless
(
connection
.
features
.
uses_savepoints
,
@unittest.skipUnless
(
"'atomic' requires transactions and savepoints."
)
connection
.
features
.
uses_savepoints
,
"'atomic' requires transactions and savepoints."
)
class
DBTransactionTests
(
TestCase
):
class
DBTransactionTests
(
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
self
.
view
=
BasicView
.
as_view
()
self
.
view
=
BasicView
.
as_view
()
...
@@ -55,8 +57,10 @@ class DBTransactionTests(TestCase):
...
@@ -55,8 +57,10 @@ class DBTransactionTests(TestCase):
assert
BasicModel
.
objects
.
count
()
==
1
assert
BasicModel
.
objects
.
count
()
==
1
@unittest.skipUnless
(
connection
.
features
.
uses_savepoints
,
@unittest.skipUnless
(
"'atomic' requires transactions and savepoints."
)
connection
.
features
.
uses_savepoints
,
"'atomic' requires transactions and savepoints."
)
class
DBTransactionErrorTests
(
TestCase
):
class
DBTransactionErrorTests
(
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
self
.
view
=
ErrorView
.
as_view
()
self
.
view
=
ErrorView
.
as_view
()
...
@@ -83,8 +87,10 @@ class DBTransactionErrorTests(TestCase):
...
@@ -83,8 +87,10 @@ class DBTransactionErrorTests(TestCase):
assert
BasicModel
.
objects
.
count
()
==
1
assert
BasicModel
.
objects
.
count
()
==
1
@unittest.skipUnless
(
connection
.
features
.
uses_savepoints
,
@unittest.skipUnless
(
"'atomic' requires transactions and savepoints."
)
connection
.
features
.
uses_savepoints
,
"'atomic' requires transactions and savepoints."
)
class
DBTransactionAPIExceptionTests
(
TestCase
):
class
DBTransactionAPIExceptionTests
(
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
self
.
view
=
APIExceptionView
.
as_view
()
self
.
view
=
APIExceptionView
.
as_view
()
...
@@ -113,8 +119,10 @@ class DBTransactionAPIExceptionTests(TestCase):
...
@@ -113,8 +119,10 @@ class DBTransactionAPIExceptionTests(TestCase):
assert
BasicModel
.
objects
.
count
()
==
0
assert
BasicModel
.
objects
.
count
()
==
0
@unittest.skipUnless
(
connection
.
features
.
uses_savepoints
,
@unittest.skipUnless
(
"'atomic' requires transactions and savepoints."
)
connection
.
features
.
uses_savepoints
,
"'atomic' requires transactions and savepoints."
)
class
NonAtomicDBTransactionAPIExceptionTests
(
TransactionTestCase
):
class
NonAtomicDBTransactionAPIExceptionTests
(
TransactionTestCase
):
@property
@property
def
urls
(
self
):
def
urls
(
self
):
...
...
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