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
085c3e8a
Commit
085c3e8a
authored
Mar 26, 2015
by
Ion Scerbatiuc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed python 2.6 compatibility
parent
bf25a6ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests/test_serializer_nested.py
+2
-2
No files found.
tests/test_serializer_nested.py
View file @
085c3e8a
...
@@ -121,7 +121,7 @@ class TestNestedSerializerWithMany:
...
@@ -121,7 +121,7 @@ class TestNestedSerializerWithMany:
serializer
=
self
.
get_serializer
(
input_data
)
serializer
=
self
.
get_serializer
(
input_data
)
assert
not
serializer
.
is_valid
()
assert
not
serializer
.
is_valid
()
assert
set
(
serializer
.
errors
)
==
{
'nested'
}
assert
set
(
serializer
.
errors
)
==
set
([
'nested'
])
assert
serializer
.
errors
[
'nested'
][
0
]
==
serializer
.
error_messages
[
'null'
]
assert
serializer
.
errors
[
'nested'
][
0
]
==
serializer
.
error_messages
[
'null'
]
def
test_run_the_field_validation_even_if_the_field_is_null
(
self
):
def
test_run_the_field_validation_even_if_the_field_is_null
(
self
):
...
@@ -132,7 +132,7 @@ class TestNestedSerializerWithMany:
...
@@ -132,7 +132,7 @@ class TestNestedSerializerWithMany:
serializer
=
self
.
get_serializer
(
input_data
,
condition_to_allow_null
=
False
)
serializer
=
self
.
get_serializer
(
input_data
,
condition_to_allow_null
=
False
)
assert
not
serializer
.
is_valid
()
assert
not
serializer
.
is_valid
()
assert
set
(
serializer
.
errors
)
==
{
'payment_info'
}
assert
set
(
serializer
.
errors
)
==
set
([
'payment_info'
])
assert
serializer
.
errors
[
'payment_info'
][
0
]
==
serializer
.
ERROR_MESSAGE
assert
serializer
.
errors
[
'payment_info'
][
0
]
==
serializer
.
ERROR_MESSAGE
def
test_expected_results_if_not_null
(
self
):
def
test_expected_results_if_not_null
(
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