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
ea92d505
Commit
ea92d505
authored
Jun 23, 2016
by
Tom Christie
Committed by
GitHub
Jun 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve tests against Django master (#4218)
parent
f81d516a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
tests/test_versioning.py
+3
-0
No files found.
tests/test_versioning.py
View file @
ea92d505
...
@@ -85,6 +85,7 @@ class TestRequestVersion:
...
@@ -85,6 +85,7 @@ class TestRequestVersion:
response
=
view
(
request
)
response
=
view
(
request
)
assert
response
.
data
==
{
'version'
:
None
}
assert
response
.
data
==
{
'version'
:
None
}
@override_settings
(
ALLOWED_HOSTS
=
[
'*'
])
def
test_host_name_versioning
(
self
):
def
test_host_name_versioning
(
self
):
scheme
=
versioning
.
HostNameVersioning
scheme
=
versioning
.
HostNameVersioning
view
=
RequestVersionView
.
as_view
(
versioning_class
=
scheme
)
view
=
RequestVersionView
.
as_view
(
versioning_class
=
scheme
)
...
@@ -173,6 +174,7 @@ class TestURLReversing(URLPatternsTestCase):
...
@@ -173,6 +174,7 @@ class TestURLReversing(URLPatternsTestCase):
response
=
view
(
request
)
response
=
view
(
request
)
assert
response
.
data
==
{
'url'
:
'http://testserver/another/'
}
assert
response
.
data
==
{
'url'
:
'http://testserver/another/'
}
@override_settings
(
ALLOWED_HOSTS
=
[
'*'
])
def
test_reverse_host_name_versioning
(
self
):
def
test_reverse_host_name_versioning
(
self
):
scheme
=
versioning
.
HostNameVersioning
scheme
=
versioning
.
HostNameVersioning
view
=
ReverseView
.
as_view
(
versioning_class
=
scheme
)
view
=
ReverseView
.
as_view
(
versioning_class
=
scheme
)
...
@@ -223,6 +225,7 @@ class TestInvalidVersion:
...
@@ -223,6 +225,7 @@ class TestInvalidVersion:
response
=
view
(
request
)
response
=
view
(
request
)
assert
response
.
status_code
==
status
.
HTTP_404_NOT_FOUND
assert
response
.
status_code
==
status
.
HTTP_404_NOT_FOUND
@override_settings
(
ALLOWED_HOSTS
=
[
'*'
])
def
test_invalid_host_name_versioning
(
self
):
def
test_invalid_host_name_versioning
(
self
):
scheme
=
versioning
.
HostNameVersioning
scheme
=
versioning
.
HostNameVersioning
view
=
RequestInvalidVersionView
.
as_view
(
versioning_class
=
scheme
)
view
=
RequestInvalidVersionView
.
as_view
(
versioning_class
=
scheme
)
...
...
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