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
068e4a18
Commit
068e4a18
authored
Sep 13, 2013
by
Tom Christie
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1108 from rbose85/master
Typo in strings referring to Python package, django-filter.
parents
ea462b7b
0de1a1a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
rest_framework/tests/test_filters.py
+7
-7
rest_framework/tests/test_pagination.py
+1
-1
No files found.
rest_framework/tests/test_filters.py
View file @
068e4a18
...
@@ -113,7 +113,7 @@ class IntegrationTestFiltering(CommonFilteringTestCase):
...
@@ -113,7 +113,7 @@ class IntegrationTestFiltering(CommonFilteringTestCase):
Integration tests for filtered list views.
Integration tests for filtered list views.
"""
"""
@unittest.skipUnless
(
django_filters
,
'django-filter
s
not installed'
)
@unittest.skipUnless
(
django_filters
,
'django-filter not installed'
)
def
test_get_filtered_fields_root_view
(
self
):
def
test_get_filtered_fields_root_view
(
self
):
"""
"""
GET requests to paginated ListCreateAPIView should return paginated results.
GET requests to paginated ListCreateAPIView should return paginated results.
...
@@ -142,7 +142,7 @@ class IntegrationTestFiltering(CommonFilteringTestCase):
...
@@ -142,7 +142,7 @@ class IntegrationTestFiltering(CommonFilteringTestCase):
expected_data
=
[
f
for
f
in
self
.
data
if
f
[
'date'
]
==
search_date
]
expected_data
=
[
f
for
f
in
self
.
data
if
f
[
'date'
]
==
search_date
]
self
.
assertEqual
(
response
.
data
,
expected_data
)
self
.
assertEqual
(
response
.
data
,
expected_data
)
@unittest.skipUnless
(
django_filters
,
'django-filter
s
not installed'
)
@unittest.skipUnless
(
django_filters
,
'django-filter not installed'
)
def
test_filter_with_queryset
(
self
):
def
test_filter_with_queryset
(
self
):
"""
"""
Regression test for #814.
Regression test for #814.
...
@@ -157,7 +157,7 @@ class IntegrationTestFiltering(CommonFilteringTestCase):
...
@@ -157,7 +157,7 @@ class IntegrationTestFiltering(CommonFilteringTestCase):
expected_data
=
[
f
for
f
in
self
.
data
if
f
[
'decimal'
]
==
search_decimal
]
expected_data
=
[
f
for
f
in
self
.
data
if
f
[
'decimal'
]
==
search_decimal
]
self
.
assertEqual
(
response
.
data
,
expected_data
)
self
.
assertEqual
(
response
.
data
,
expected_data
)
@unittest.skipUnless
(
django_filters
,
'django-filter
s
not installed'
)
@unittest.skipUnless
(
django_filters
,
'django-filter not installed'
)
def
test_filter_with_get_queryset_only
(
self
):
def
test_filter_with_get_queryset_only
(
self
):
"""
"""
Regression test for #834.
Regression test for #834.
...
@@ -168,7 +168,7 @@ class IntegrationTestFiltering(CommonFilteringTestCase):
...
@@ -168,7 +168,7 @@ class IntegrationTestFiltering(CommonFilteringTestCase):
# Used to raise "issubclass() arg 2 must be a class or tuple of classes"
# Used to raise "issubclass() arg 2 must be a class or tuple of classes"
# here when neither `model' nor `queryset' was specified.
# here when neither `model' nor `queryset' was specified.
@unittest.skipUnless
(
django_filters
,
'django-filter
s
not installed'
)
@unittest.skipUnless
(
django_filters
,
'django-filter not installed'
)
def
test_get_filtered_class_root_view
(
self
):
def
test_get_filtered_class_root_view
(
self
):
"""
"""
GET requests to filtered ListCreateAPIView that have a filter_class set
GET requests to filtered ListCreateAPIView that have a filter_class set
...
@@ -216,7 +216,7 @@ class IntegrationTestFiltering(CommonFilteringTestCase):
...
@@ -216,7 +216,7 @@ class IntegrationTestFiltering(CommonFilteringTestCase):
f
[
'decimal'
]
<
search_decimal
]
f
[
'decimal'
]
<
search_decimal
]
self
.
assertEqual
(
response
.
data
,
expected_data
)
self
.
assertEqual
(
response
.
data
,
expected_data
)
@unittest.skipUnless
(
django_filters
,
'django-filter
s
not installed'
)
@unittest.skipUnless
(
django_filters
,
'django-filter not installed'
)
def
test_incorrectly_configured_filter
(
self
):
def
test_incorrectly_configured_filter
(
self
):
"""
"""
An error should be displayed when the filter class is misconfigured.
An error should be displayed when the filter class is misconfigured.
...
@@ -226,7 +226,7 @@ class IntegrationTestFiltering(CommonFilteringTestCase):
...
@@ -226,7 +226,7 @@ class IntegrationTestFiltering(CommonFilteringTestCase):
request
=
factory
.
get
(
'/'
)
request
=
factory
.
get
(
'/'
)
self
.
assertRaises
(
AssertionError
,
view
,
request
)
self
.
assertRaises
(
AssertionError
,
view
,
request
)
@unittest.skipUnless
(
django_filters
,
'django-filter
s
not installed'
)
@unittest.skipUnless
(
django_filters
,
'django-filter not installed'
)
def
test_unknown_filter
(
self
):
def
test_unknown_filter
(
self
):
"""
"""
GET requests with filters that aren't configured should return 200.
GET requests with filters that aren't configured should return 200.
...
@@ -248,7 +248,7 @@ class IntegrationTestDetailFiltering(CommonFilteringTestCase):
...
@@ -248,7 +248,7 @@ class IntegrationTestDetailFiltering(CommonFilteringTestCase):
def
_get_url
(
self
,
item
):
def
_get_url
(
self
,
item
):
return
reverse
(
'detail-view'
,
kwargs
=
dict
(
pk
=
item
.
pk
))
return
reverse
(
'detail-view'
,
kwargs
=
dict
(
pk
=
item
.
pk
))
@unittest.skipUnless
(
django_filters
,
'django-filter
s
not installed'
)
@unittest.skipUnless
(
django_filters
,
'django-filter not installed'
)
def
test_get_filtered_detail_view
(
self
):
def
test_get_filtered_detail_view
(
self
):
"""
"""
GET requests to filtered RetrieveAPIView that have a filter_class set
GET requests to filtered RetrieveAPIView that have a filter_class set
...
...
rest_framework/tests/test_pagination.py
View file @
068e4a18
...
@@ -122,7 +122,7 @@ class IntegrationTestPaginationAndFiltering(TestCase):
...
@@ -122,7 +122,7 @@ class IntegrationTestPaginationAndFiltering(TestCase):
for
obj
in
self
.
objects
.
all
()
for
obj
in
self
.
objects
.
all
()
]
]
@unittest.skipUnless
(
django_filters
,
'django-filter
s
not installed'
)
@unittest.skipUnless
(
django_filters
,
'django-filter not installed'
)
def
test_get_django_filter_paginated_filtered_root_view
(
self
):
def
test_get_django_filter_paginated_filtered_root_view
(
self
):
"""
"""
GET requests to paginated filtered ListCreateAPIView should return
GET requests to paginated filtered ListCreateAPIView should return
...
...
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