diff options
| author | Tom Christie | 2011-06-02 12:58:10 +0100 |
|---|---|---|
| committer | Tom Christie | 2011-06-02 12:58:10 +0100 |
| commit | b50492853f537a2473bb0a9eea86c8b0ed6b8824 (patch) | |
| tree | d289d39aacf187a8a0696a4c1c863aabe1472c3a /djangorestframework/tests/breadcrumbs.py | |
| parent | 7ee9adbe5c03c29cd4a894dd476548f7fe73b5e4 (diff) | |
| parent | fc1640de75511006e89f033c9270ec91a9f1e4d4 (diff) | |
| download | django-rest-framework-b50492853f537a2473bb0a9eea86c8b0ed6b8824.tar.bz2 | |
pull in -dev as 0.2.0
Diffstat (limited to 'djangorestframework/tests/breadcrumbs.py')
| -rw-r--r-- | djangorestframework/tests/breadcrumbs.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/djangorestframework/tests/breadcrumbs.py b/djangorestframework/tests/breadcrumbs.py index cc0d283d..dc1a02bf 100644 --- a/djangorestframework/tests/breadcrumbs.py +++ b/djangorestframework/tests/breadcrumbs.py @@ -1,34 +1,34 @@ from django.conf.urls.defaults import patterns, url from django.test import TestCase -from djangorestframework.breadcrumbs import get_breadcrumbs -from djangorestframework.resource import Resource +from djangorestframework.utils.breadcrumbs import get_breadcrumbs +from djangorestframework.views import View -class Root(Resource): +class Root(View): pass -class ResourceRoot(Resource): +class ResourceRoot(View): pass -class ResourceInstance(Resource): +class ResourceInstance(View): pass -class NestedResourceRoot(Resource): +class NestedResourceRoot(View): pass -class NestedResourceInstance(Resource): +class NestedResourceInstance(View): pass urlpatterns = patterns('', - url(r'^$', Root), - url(r'^resource/$', ResourceRoot), - url(r'^resource/(?P<key>[0-9]+)$', ResourceInstance), - url(r'^resource/(?P<key>[0-9]+)/$', NestedResourceRoot), - url(r'^resource/(?P<key>[0-9]+)/(?P<other>[A-Za-z]+)$', NestedResourceInstance), + url(r'^$', Root.as_view()), + url(r'^resource/$', ResourceRoot.as_view()), + url(r'^resource/(?P<key>[0-9]+)$', ResourceInstance.as_view()), + url(r'^resource/(?P<key>[0-9]+)/$', NestedResourceRoot.as_view()), + url(r'^resource/(?P<key>[0-9]+)/(?P<other>[A-Za-z]+)$', NestedResourceInstance.as_view()), ) class BreadcrumbTests(TestCase): - """Tests the breadcrumb functionality used by the HTML emitter.""" + """Tests the breadcrumb functionality used by the HTML renderer.""" urls = 'djangorestframework.tests.breadcrumbs' |
