mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-17 03:51:03 +03:00
Change test urls to match 1.6 test module name style
This commit is contained in:
parent
cb49c5d3c0
commit
85fe7197bf
|
@ -63,7 +63,7 @@ if oauth2_provider is not None:
|
|||
|
||||
class BasicAuthTests(TestCase):
|
||||
"""Basic authentication"""
|
||||
urls = 'rest_framework.tests.authentication'
|
||||
urls = 'rest_framework.tests.test_authentication'
|
||||
|
||||
def setUp(self):
|
||||
self.csrf_client = Client(enforce_csrf_checks=True)
|
||||
|
@ -102,7 +102,7 @@ class BasicAuthTests(TestCase):
|
|||
|
||||
class SessionAuthTests(TestCase):
|
||||
"""User session authentication"""
|
||||
urls = 'rest_framework.tests.authentication'
|
||||
urls = 'rest_framework.tests.test_authentication'
|
||||
|
||||
def setUp(self):
|
||||
self.csrf_client = Client(enforce_csrf_checks=True)
|
||||
|
@ -149,7 +149,7 @@ class SessionAuthTests(TestCase):
|
|||
|
||||
class TokenAuthTests(TestCase):
|
||||
"""Token authentication"""
|
||||
urls = 'rest_framework.tests.authentication'
|
||||
urls = 'rest_framework.tests.test_authentication'
|
||||
|
||||
def setUp(self):
|
||||
self.csrf_client = Client(enforce_csrf_checks=True)
|
||||
|
@ -243,7 +243,7 @@ class IncorrectCredentialsTests(TestCase):
|
|||
|
||||
class OAuthTests(TestCase):
|
||||
"""OAuth 1.0a authentication"""
|
||||
urls = 'rest_framework.tests.authentication'
|
||||
urls = 'rest_framework.tests.test_authentication'
|
||||
|
||||
def setUp(self):
|
||||
# these imports are here because oauth is optional and hiding them in try..except block or compat
|
||||
|
@ -429,7 +429,7 @@ class OAuthTests(TestCase):
|
|||
|
||||
class OAuth2Tests(TestCase):
|
||||
"""OAuth 2.0 authentication"""
|
||||
urls = 'rest_framework.tests.authentication'
|
||||
urls = 'rest_framework.tests.test_authentication'
|
||||
|
||||
def setUp(self):
|
||||
self.csrf_client = Client(enforce_csrf_checks=True)
|
||||
|
|
|
@ -36,7 +36,7 @@ urlpatterns = patterns('',
|
|||
class BreadcrumbTests(TestCase):
|
||||
"""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):
|
||||
url = '/'
|
||||
|
|
|
@ -243,7 +243,7 @@ class IntegrationTestDetailFiltering(CommonFilteringTestCase):
|
|||
"""
|
||||
Integration tests for filtered detail views.
|
||||
"""
|
||||
urls = 'rest_framework.tests.filters'
|
||||
urls = 'rest_framework.tests.test_filters'
|
||||
|
||||
def _get_url(self, item):
|
||||
return reverse('detail-view', kwargs=dict(pk=item.pk))
|
||||
|
|
|
@ -42,7 +42,7 @@ urlpatterns = patterns('',
|
|||
|
||||
|
||||
class TemplateHTMLRendererTests(TestCase):
|
||||
urls = 'rest_framework.tests.htmlrenderer'
|
||||
urls = 'rest_framework.tests.test_htmlrenderer'
|
||||
|
||||
def setUp(self):
|
||||
"""
|
||||
|
@ -82,7 +82,7 @@ class TemplateHTMLRendererTests(TestCase):
|
|||
|
||||
|
||||
class TemplateHTMLRendererExceptionTests(TestCase):
|
||||
urls = 'rest_framework.tests.htmlrenderer'
|
||||
urls = 'rest_framework.tests.test_htmlrenderer'
|
||||
|
||||
def setUp(self):
|
||||
"""
|
||||
|
|
|
@ -106,7 +106,7 @@ urlpatterns = patterns('',
|
|||
|
||||
|
||||
class TestBasicHyperlinkedView(TestCase):
|
||||
urls = 'rest_framework.tests.hyperlinkedserializers'
|
||||
urls = 'rest_framework.tests.test_hyperlinkedserializers'
|
||||
|
||||
def setUp(self):
|
||||
"""
|
||||
|
@ -143,7 +143,7 @@ class TestBasicHyperlinkedView(TestCase):
|
|||
|
||||
|
||||
class TestManyToManyHyperlinkedView(TestCase):
|
||||
urls = 'rest_framework.tests.hyperlinkedserializers'
|
||||
urls = 'rest_framework.tests.test_hyperlinkedserializers'
|
||||
|
||||
def setUp(self):
|
||||
"""
|
||||
|
@ -191,7 +191,7 @@ class TestManyToManyHyperlinkedView(TestCase):
|
|||
|
||||
|
||||
class TestHyperlinkedIdentityFieldLookup(TestCase):
|
||||
urls = 'rest_framework.tests.hyperlinkedserializers'
|
||||
urls = 'rest_framework.tests.test_hyperlinkedserializers'
|
||||
|
||||
def setUp(self):
|
||||
"""
|
||||
|
@ -221,7 +221,7 @@ class TestHyperlinkedIdentityFieldLookup(TestCase):
|
|||
|
||||
|
||||
class TestCreateWithForeignKeys(TestCase):
|
||||
urls = 'rest_framework.tests.hyperlinkedserializers'
|
||||
urls = 'rest_framework.tests.test_hyperlinkedserializers'
|
||||
|
||||
def setUp(self):
|
||||
"""
|
||||
|
@ -246,7 +246,7 @@ class TestCreateWithForeignKeys(TestCase):
|
|||
|
||||
|
||||
class TestCreateWithForeignKeysAndCustomSlug(TestCase):
|
||||
urls = 'rest_framework.tests.hyperlinkedserializers'
|
||||
urls = 'rest_framework.tests.test_hyperlinkedserializers'
|
||||
|
||||
def setUp(self):
|
||||
"""
|
||||
|
@ -271,7 +271,7 @@ class TestCreateWithForeignKeysAndCustomSlug(TestCase):
|
|||
|
||||
|
||||
class TestOptionalRelationHyperlinkedView(TestCase):
|
||||
urls = 'rest_framework.tests.hyperlinkedserializers'
|
||||
urls = 'rest_framework.tests.test_hyperlinkedserializers'
|
||||
|
||||
def setUp(self):
|
||||
"""
|
||||
|
|
|
@ -71,7 +71,7 @@ class NullableOneToOneTargetSerializer(serializers.HyperlinkedModelSerializer):
|
|||
# TODO: Add test that .data cannot be accessed prior to .is_valid
|
||||
|
||||
class HyperlinkedManyToManyTests(TestCase):
|
||||
urls = 'rest_framework.tests.relations_hyperlink'
|
||||
urls = 'rest_framework.tests.test_relations_hyperlink'
|
||||
|
||||
def setUp(self):
|
||||
for idx in range(1, 4):
|
||||
|
@ -179,7 +179,7 @@ class HyperlinkedManyToManyTests(TestCase):
|
|||
|
||||
|
||||
class HyperlinkedForeignKeyTests(TestCase):
|
||||
urls = 'rest_framework.tests.relations_hyperlink'
|
||||
urls = 'rest_framework.tests.test_relations_hyperlink'
|
||||
|
||||
def setUp(self):
|
||||
target = ForeignKeyTarget(name='target-1')
|
||||
|
@ -307,7 +307,7 @@ class HyperlinkedForeignKeyTests(TestCase):
|
|||
|
||||
|
||||
class HyperlinkedNullableForeignKeyTests(TestCase):
|
||||
urls = 'rest_framework.tests.relations_hyperlink'
|
||||
urls = 'rest_framework.tests.test_relations_hyperlink'
|
||||
|
||||
def setUp(self):
|
||||
target = ForeignKeyTarget(name='target-1')
|
||||
|
@ -435,7 +435,7 @@ class HyperlinkedNullableForeignKeyTests(TestCase):
|
|||
|
||||
|
||||
class HyperlinkedNullableOneToOneTests(TestCase):
|
||||
urls = 'rest_framework.tests.relations_hyperlink'
|
||||
urls = 'rest_framework.tests.test_relations_hyperlink'
|
||||
|
||||
def setUp(self):
|
||||
target = OneToOneTarget(name='target-1')
|
||||
|
@ -458,7 +458,7 @@ class HyperlinkedNullableOneToOneTests(TestCase):
|
|||
# Regression tests for #694 (`source` attribute on related fields)
|
||||
|
||||
class HyperlinkedRelatedFieldSourceTests(TestCase):
|
||||
urls = 'rest_framework.tests.relations_hyperlink'
|
||||
urls = 'rest_framework.tests.test_relations_hyperlink'
|
||||
|
||||
def test_related_manager_source(self):
|
||||
"""
|
||||
|
|
|
@ -133,7 +133,7 @@ class RendererEndToEndTests(TestCase):
|
|||
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):
|
||||
"""If the Accept header is not set the default renderer should serialize the response."""
|
||||
|
@ -288,7 +288,7 @@ class JSONPRendererTests(TestCase):
|
|||
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):
|
||||
"""
|
||||
|
@ -461,7 +461,7 @@ class CacheRenderTest(TestCase):
|
|||
Tests specific to caching responses
|
||||
"""
|
||||
|
||||
urls = 'rest_framework.tests.renderers'
|
||||
urls = 'rest_framework.tests.test_renderers'
|
||||
|
||||
cache_key = 'just_a_cache_key'
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ urlpatterns = patterns('',
|
|||
|
||||
|
||||
class TestContentParsingWithAuthentication(TestCase):
|
||||
urls = 'rest_framework.tests.request'
|
||||
urls = 'rest_framework.tests.test_request'
|
||||
|
||||
def setUp(self):
|
||||
self.csrf_client = Client(enforce_csrf_checks=True)
|
||||
|
|
|
@ -118,7 +118,7 @@ class RendererIntegrationTests(TestCase):
|
|||
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):
|
||||
"""If the Accept header is not set the default renderer should serialize the response."""
|
||||
|
@ -198,7 +198,7 @@ class Issue122Tests(TestCase):
|
|||
"""
|
||||
Tests that covers #122.
|
||||
"""
|
||||
urls = 'rest_framework.tests.response'
|
||||
urls = 'rest_framework.tests.test_response'
|
||||
|
||||
def test_only_html_renderer(self):
|
||||
"""
|
||||
|
@ -218,7 +218,7 @@ class Issue467Tests(TestCase):
|
|||
Tests for #467
|
||||
"""
|
||||
|
||||
urls = 'rest_framework.tests.response'
|
||||
urls = 'rest_framework.tests.test_response'
|
||||
|
||||
def test_form_has_label_and_help_text(self):
|
||||
resp = self.client.get('/html_new_model')
|
||||
|
@ -232,7 +232,7 @@ class Issue807Tests(TestCase):
|
|||
Covers #807
|
||||
"""
|
||||
|
||||
urls = 'rest_framework.tests.response'
|
||||
urls = 'rest_framework.tests.test_response'
|
||||
|
||||
def test_does_not_append_charset_by_default(self):
|
||||
"""
|
||||
|
|
|
@ -19,7 +19,7 @@ class ReverseTests(TestCase):
|
|||
"""
|
||||
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):
|
||||
request = factory.get('/view')
|
||||
|
|
|
@ -36,7 +36,7 @@ class MockView_MinuteThrottling(APIView):
|
|||
|
||||
|
||||
class ThrottlingTests(TestCase):
|
||||
urls = 'rest_framework.tests.throttling'
|
||||
urls = 'rest_framework.tests.test_throttling'
|
||||
|
||||
def setUp(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user