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
85fe7197
Commit
85fe7197
authored
May 29, 2013
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change test urls to match 1.6 test module name style
parent
cb49c5d3
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
30 additions
and
30 deletions
+30
-30
rest_framework/tests/test_authentication.py
+5
-5
rest_framework/tests/test_breadcrumbs.py
+1
-1
rest_framework/tests/test_filters.py
+1
-1
rest_framework/tests/test_htmlrenderer.py
+2
-2
rest_framework/tests/test_hyperlinkedserializers.py
+6
-6
rest_framework/tests/test_relations_hyperlink.py
+5
-5
rest_framework/tests/test_renderers.py
+3
-3
rest_framework/tests/test_request.py
+1
-1
rest_framework/tests/test_response.py
+4
-4
rest_framework/tests/test_reverse.py
+1
-1
rest_framework/tests/test_throttling.py
+1
-1
No files found.
rest_framework/tests/test_authentication.py
View file @
85fe7197
...
@@ -63,7 +63,7 @@ if oauth2_provider is not None:
...
@@ -63,7 +63,7 @@ if oauth2_provider is not None:
class
BasicAuthTests
(
TestCase
):
class
BasicAuthTests
(
TestCase
):
"""Basic authentication"""
"""Basic authentication"""
urls
=
'rest_framework.tests.authentication'
urls
=
'rest_framework.tests.
test_
authentication'
def
setUp
(
self
):
def
setUp
(
self
):
self
.
csrf_client
=
Client
(
enforce_csrf_checks
=
True
)
self
.
csrf_client
=
Client
(
enforce_csrf_checks
=
True
)
...
@@ -102,7 +102,7 @@ class BasicAuthTests(TestCase):
...
@@ -102,7 +102,7 @@ class BasicAuthTests(TestCase):
class
SessionAuthTests
(
TestCase
):
class
SessionAuthTests
(
TestCase
):
"""User session authentication"""
"""User session authentication"""
urls
=
'rest_framework.tests.authentication'
urls
=
'rest_framework.tests.
test_
authentication'
def
setUp
(
self
):
def
setUp
(
self
):
self
.
csrf_client
=
Client
(
enforce_csrf_checks
=
True
)
self
.
csrf_client
=
Client
(
enforce_csrf_checks
=
True
)
...
@@ -149,7 +149,7 @@ class SessionAuthTests(TestCase):
...
@@ -149,7 +149,7 @@ class SessionAuthTests(TestCase):
class
TokenAuthTests
(
TestCase
):
class
TokenAuthTests
(
TestCase
):
"""Token authentication"""
"""Token authentication"""
urls
=
'rest_framework.tests.authentication'
urls
=
'rest_framework.tests.
test_
authentication'
def
setUp
(
self
):
def
setUp
(
self
):
self
.
csrf_client
=
Client
(
enforce_csrf_checks
=
True
)
self
.
csrf_client
=
Client
(
enforce_csrf_checks
=
True
)
...
@@ -243,7 +243,7 @@ class IncorrectCredentialsTests(TestCase):
...
@@ -243,7 +243,7 @@ class IncorrectCredentialsTests(TestCase):
class
OAuthTests
(
TestCase
):
class
OAuthTests
(
TestCase
):
"""OAuth 1.0a authentication"""
"""OAuth 1.0a authentication"""
urls
=
'rest_framework.tests.authentication'
urls
=
'rest_framework.tests.
test_
authentication'
def
setUp
(
self
):
def
setUp
(
self
):
# these imports are here because oauth is optional and hiding them in try..except block or compat
# these imports are here because oauth is optional and hiding them in try..except block or compat
...
@@ -429,7 +429,7 @@ class OAuthTests(TestCase):
...
@@ -429,7 +429,7 @@ class OAuthTests(TestCase):
class
OAuth2Tests
(
TestCase
):
class
OAuth2Tests
(
TestCase
):
"""OAuth 2.0 authentication"""
"""OAuth 2.0 authentication"""
urls
=
'rest_framework.tests.authentication'
urls
=
'rest_framework.tests.
test_
authentication'
def
setUp
(
self
):
def
setUp
(
self
):
self
.
csrf_client
=
Client
(
enforce_csrf_checks
=
True
)
self
.
csrf_client
=
Client
(
enforce_csrf_checks
=
True
)
...
...
rest_framework/tests/test_breadcrumbs.py
View file @
85fe7197
...
@@ -36,7 +36,7 @@ urlpatterns = patterns('',
...
@@ -36,7 +36,7 @@ urlpatterns = patterns('',
class
BreadcrumbTests
(
TestCase
):
class
BreadcrumbTests
(
TestCase
):
"""Tests the breadcrumb functionality used by the HTML renderer."""
"""Tests the breadcrumb functionality used by the HTML renderer."""
urls
=
'rest_framework.tests.breadcrumbs'
urls
=
'rest_framework.tests.
test_
breadcrumbs'
def
test_root_breadcrumbs
(
self
):
def
test_root_breadcrumbs
(
self
):
url
=
'/'
url
=
'/'
...
...
rest_framework/tests/test_filters.py
View file @
85fe7197
...
@@ -243,7 +243,7 @@ class IntegrationTestDetailFiltering(CommonFilteringTestCase):
...
@@ -243,7 +243,7 @@ class IntegrationTestDetailFiltering(CommonFilteringTestCase):
"""
"""
Integration tests for filtered detail views.
Integration tests for filtered detail views.
"""
"""
urls
=
'rest_framework.tests.filters'
urls
=
'rest_framework.tests.
test_
filters'
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
))
...
...
rest_framework/tests/test_htmlrenderer.py
View file @
85fe7197
...
@@ -42,7 +42,7 @@ urlpatterns = patterns('',
...
@@ -42,7 +42,7 @@ urlpatterns = patterns('',
class
TemplateHTMLRendererTests
(
TestCase
):
class
TemplateHTMLRendererTests
(
TestCase
):
urls
=
'rest_framework.tests.htmlrenderer'
urls
=
'rest_framework.tests.
test_
htmlrenderer'
def
setUp
(
self
):
def
setUp
(
self
):
"""
"""
...
@@ -82,7 +82,7 @@ class TemplateHTMLRendererTests(TestCase):
...
@@ -82,7 +82,7 @@ class TemplateHTMLRendererTests(TestCase):
class
TemplateHTMLRendererExceptionTests
(
TestCase
):
class
TemplateHTMLRendererExceptionTests
(
TestCase
):
urls
=
'rest_framework.tests.htmlrenderer'
urls
=
'rest_framework.tests.
test_
htmlrenderer'
def
setUp
(
self
):
def
setUp
(
self
):
"""
"""
...
...
rest_framework/tests/test_hyperlinkedserializers.py
View file @
85fe7197
...
@@ -106,7 +106,7 @@ urlpatterns = patterns('',
...
@@ -106,7 +106,7 @@ urlpatterns = patterns('',
class
TestBasicHyperlinkedView
(
TestCase
):
class
TestBasicHyperlinkedView
(
TestCase
):
urls
=
'rest_framework.tests.hyperlinkedserializers'
urls
=
'rest_framework.tests.
test_
hyperlinkedserializers'
def
setUp
(
self
):
def
setUp
(
self
):
"""
"""
...
@@ -143,7 +143,7 @@ class TestBasicHyperlinkedView(TestCase):
...
@@ -143,7 +143,7 @@ class TestBasicHyperlinkedView(TestCase):
class
TestManyToManyHyperlinkedView
(
TestCase
):
class
TestManyToManyHyperlinkedView
(
TestCase
):
urls
=
'rest_framework.tests.hyperlinkedserializers'
urls
=
'rest_framework.tests.
test_
hyperlinkedserializers'
def
setUp
(
self
):
def
setUp
(
self
):
"""
"""
...
@@ -191,7 +191,7 @@ class TestManyToManyHyperlinkedView(TestCase):
...
@@ -191,7 +191,7 @@ class TestManyToManyHyperlinkedView(TestCase):
class
TestHyperlinkedIdentityFieldLookup
(
TestCase
):
class
TestHyperlinkedIdentityFieldLookup
(
TestCase
):
urls
=
'rest_framework.tests.hyperlinkedserializers'
urls
=
'rest_framework.tests.
test_
hyperlinkedserializers'
def
setUp
(
self
):
def
setUp
(
self
):
"""
"""
...
@@ -221,7 +221,7 @@ class TestHyperlinkedIdentityFieldLookup(TestCase):
...
@@ -221,7 +221,7 @@ class TestHyperlinkedIdentityFieldLookup(TestCase):
class
TestCreateWithForeignKeys
(
TestCase
):
class
TestCreateWithForeignKeys
(
TestCase
):
urls
=
'rest_framework.tests.hyperlinkedserializers'
urls
=
'rest_framework.tests.
test_
hyperlinkedserializers'
def
setUp
(
self
):
def
setUp
(
self
):
"""
"""
...
@@ -246,7 +246,7 @@ class TestCreateWithForeignKeys(TestCase):
...
@@ -246,7 +246,7 @@ class TestCreateWithForeignKeys(TestCase):
class
TestCreateWithForeignKeysAndCustomSlug
(
TestCase
):
class
TestCreateWithForeignKeysAndCustomSlug
(
TestCase
):
urls
=
'rest_framework.tests.hyperlinkedserializers'
urls
=
'rest_framework.tests.
test_
hyperlinkedserializers'
def
setUp
(
self
):
def
setUp
(
self
):
"""
"""
...
@@ -271,7 +271,7 @@ class TestCreateWithForeignKeysAndCustomSlug(TestCase):
...
@@ -271,7 +271,7 @@ class TestCreateWithForeignKeysAndCustomSlug(TestCase):
class
TestOptionalRelationHyperlinkedView
(
TestCase
):
class
TestOptionalRelationHyperlinkedView
(
TestCase
):
urls
=
'rest_framework.tests.hyperlinkedserializers'
urls
=
'rest_framework.tests.
test_
hyperlinkedserializers'
def
setUp
(
self
):
def
setUp
(
self
):
"""
"""
...
...
rest_framework/tests/test_relations_hyperlink.py
View file @
85fe7197
...
@@ -71,7 +71,7 @@ class NullableOneToOneTargetSerializer(serializers.HyperlinkedModelSerializer):
...
@@ -71,7 +71,7 @@ class NullableOneToOneTargetSerializer(serializers.HyperlinkedModelSerializer):
# TODO: Add test that .data cannot be accessed prior to .is_valid
# TODO: Add test that .data cannot be accessed prior to .is_valid
class
HyperlinkedManyToManyTests
(
TestCase
):
class
HyperlinkedManyToManyTests
(
TestCase
):
urls
=
'rest_framework.tests.relations_hyperlink'
urls
=
'rest_framework.tests.
test_
relations_hyperlink'
def
setUp
(
self
):
def
setUp
(
self
):
for
idx
in
range
(
1
,
4
):
for
idx
in
range
(
1
,
4
):
...
@@ -179,7 +179,7 @@ class HyperlinkedManyToManyTests(TestCase):
...
@@ -179,7 +179,7 @@ class HyperlinkedManyToManyTests(TestCase):
class
HyperlinkedForeignKeyTests
(
TestCase
):
class
HyperlinkedForeignKeyTests
(
TestCase
):
urls
=
'rest_framework.tests.relations_hyperlink'
urls
=
'rest_framework.tests.
test_
relations_hyperlink'
def
setUp
(
self
):
def
setUp
(
self
):
target
=
ForeignKeyTarget
(
name
=
'target-1'
)
target
=
ForeignKeyTarget
(
name
=
'target-1'
)
...
@@ -307,7 +307,7 @@ class HyperlinkedForeignKeyTests(TestCase):
...
@@ -307,7 +307,7 @@ class HyperlinkedForeignKeyTests(TestCase):
class
HyperlinkedNullableForeignKeyTests
(
TestCase
):
class
HyperlinkedNullableForeignKeyTests
(
TestCase
):
urls
=
'rest_framework.tests.relations_hyperlink'
urls
=
'rest_framework.tests.
test_
relations_hyperlink'
def
setUp
(
self
):
def
setUp
(
self
):
target
=
ForeignKeyTarget
(
name
=
'target-1'
)
target
=
ForeignKeyTarget
(
name
=
'target-1'
)
...
@@ -435,7 +435,7 @@ class HyperlinkedNullableForeignKeyTests(TestCase):
...
@@ -435,7 +435,7 @@ class HyperlinkedNullableForeignKeyTests(TestCase):
class
HyperlinkedNullableOneToOneTests
(
TestCase
):
class
HyperlinkedNullableOneToOneTests
(
TestCase
):
urls
=
'rest_framework.tests.relations_hyperlink'
urls
=
'rest_framework.tests.
test_
relations_hyperlink'
def
setUp
(
self
):
def
setUp
(
self
):
target
=
OneToOneTarget
(
name
=
'target-1'
)
target
=
OneToOneTarget
(
name
=
'target-1'
)
...
@@ -458,7 +458,7 @@ class HyperlinkedNullableOneToOneTests(TestCase):
...
@@ -458,7 +458,7 @@ class HyperlinkedNullableOneToOneTests(TestCase):
# Regression tests for #694 (`source` attribute on related fields)
# Regression tests for #694 (`source` attribute on related fields)
class
HyperlinkedRelatedFieldSourceTests
(
TestCase
):
class
HyperlinkedRelatedFieldSourceTests
(
TestCase
):
urls
=
'rest_framework.tests.relations_hyperlink'
urls
=
'rest_framework.tests.
test_
relations_hyperlink'
def
test_related_manager_source
(
self
):
def
test_related_manager_source
(
self
):
"""
"""
...
...
rest_framework/tests/test_renderers.py
View file @
85fe7197
...
@@ -133,7 +133,7 @@ class RendererEndToEndTests(TestCase):
...
@@ -133,7 +133,7 @@ class RendererEndToEndTests(TestCase):
End-to-end testing of renderers using an RendererMixin on a generic view.
End-to-end testing of renderers using an RendererMixin on a generic view.
"""
"""
urls
=
'rest_framework.tests.renderers'
urls
=
'rest_framework.tests.
test_
renderers'
def
test_default_renderer_serializes_content
(
self
):
def
test_default_renderer_serializes_content
(
self
):
"""If the Accept header is not set the default renderer should serialize the response."""
"""If the Accept header is not set the default renderer should serialize the response."""
...
@@ -288,7 +288,7 @@ class JSONPRendererTests(TestCase):
...
@@ -288,7 +288,7 @@ class JSONPRendererTests(TestCase):
Tests specific to the JSONP Renderer
Tests specific to the JSONP Renderer
"""
"""
urls
=
'rest_framework.tests.renderers'
urls
=
'rest_framework.tests.
test_
renderers'
def
test_without_callback_with_json_renderer
(
self
):
def
test_without_callback_with_json_renderer
(
self
):
"""
"""
...
@@ -461,7 +461,7 @@ class CacheRenderTest(TestCase):
...
@@ -461,7 +461,7 @@ class CacheRenderTest(TestCase):
Tests specific to caching responses
Tests specific to caching responses
"""
"""
urls
=
'rest_framework.tests.renderers'
urls
=
'rest_framework.tests.
test_
renderers'
cache_key
=
'just_a_cache_key'
cache_key
=
'just_a_cache_key'
...
...
rest_framework/tests/test_request.py
View file @
85fe7197
...
@@ -254,7 +254,7 @@ urlpatterns = patterns('',
...
@@ -254,7 +254,7 @@ urlpatterns = patterns('',
class
TestContentParsingWithAuthentication
(
TestCase
):
class
TestContentParsingWithAuthentication
(
TestCase
):
urls
=
'rest_framework.tests.request'
urls
=
'rest_framework.tests.
test_
request'
def
setUp
(
self
):
def
setUp
(
self
):
self
.
csrf_client
=
Client
(
enforce_csrf_checks
=
True
)
self
.
csrf_client
=
Client
(
enforce_csrf_checks
=
True
)
...
...
rest_framework/tests/test_response.py
View file @
85fe7197
...
@@ -118,7 +118,7 @@ class RendererIntegrationTests(TestCase):
...
@@ -118,7 +118,7 @@ class RendererIntegrationTests(TestCase):
End-to-end testing of renderers using an ResponseMixin on a generic view.
End-to-end testing of renderers using an ResponseMixin on a generic view.
"""
"""
urls
=
'rest_framework.tests.response'
urls
=
'rest_framework.tests.
test_
response'
def
test_default_renderer_serializes_content
(
self
):
def
test_default_renderer_serializes_content
(
self
):
"""If the Accept header is not set the default renderer should serialize the response."""
"""If the Accept header is not set the default renderer should serialize the response."""
...
@@ -198,7 +198,7 @@ class Issue122Tests(TestCase):
...
@@ -198,7 +198,7 @@ class Issue122Tests(TestCase):
"""
"""
Tests that covers #122.
Tests that covers #122.
"""
"""
urls
=
'rest_framework.tests.response'
urls
=
'rest_framework.tests.
test_
response'
def
test_only_html_renderer
(
self
):
def
test_only_html_renderer
(
self
):
"""
"""
...
@@ -218,7 +218,7 @@ class Issue467Tests(TestCase):
...
@@ -218,7 +218,7 @@ class Issue467Tests(TestCase):
Tests for #467
Tests for #467
"""
"""
urls
=
'rest_framework.tests.response'
urls
=
'rest_framework.tests.
test_
response'
def
test_form_has_label_and_help_text
(
self
):
def
test_form_has_label_and_help_text
(
self
):
resp
=
self
.
client
.
get
(
'/html_new_model'
)
resp
=
self
.
client
.
get
(
'/html_new_model'
)
...
@@ -232,7 +232,7 @@ class Issue807Tests(TestCase):
...
@@ -232,7 +232,7 @@ class Issue807Tests(TestCase):
Covers #807
Covers #807
"""
"""
urls
=
'rest_framework.tests.response'
urls
=
'rest_framework.tests.
test_
response'
def
test_does_not_append_charset_by_default
(
self
):
def
test_does_not_append_charset_by_default
(
self
):
"""
"""
...
...
rest_framework/tests/test_reverse.py
View file @
85fe7197
...
@@ -19,7 +19,7 @@ class ReverseTests(TestCase):
...
@@ -19,7 +19,7 @@ class ReverseTests(TestCase):
"""
"""
Tests for fully qualified URLs when using `reverse`.
Tests for fully qualified URLs when using `reverse`.
"""
"""
urls
=
'rest_framework.tests.reverse'
urls
=
'rest_framework.tests.
test_
reverse'
def
test_reversed_urls_are_fully_qualified
(
self
):
def
test_reversed_urls_are_fully_qualified
(
self
):
request
=
factory
.
get
(
'/view'
)
request
=
factory
.
get
(
'/view'
)
...
...
rest_framework/tests/test_throttling.py
View file @
85fe7197
...
@@ -36,7 +36,7 @@ class MockView_MinuteThrottling(APIView):
...
@@ -36,7 +36,7 @@ class MockView_MinuteThrottling(APIView):
class
ThrottlingTests
(
TestCase
):
class
ThrottlingTests
(
TestCase
):
urls
=
'rest_framework.tests.throttling'
urls
=
'rest_framework.tests.t
est_t
hrottling'
def
setUp
(
self
):
def
setUp
(
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