diff --git a/api/tests.py b/api/tests.py index 9e1c1bd..f5172d1 100644 --- a/api/tests.py +++ b/api/tests.py @@ -41,7 +41,7 @@ class ApiTest(TestCase): duckcomp.save() def test_duck_comp_list(self): - response = self.client.get('/api/duck/1/competence.json') + response = self.client.get('/api/v1/duck/1/competence.json') self.assertEqual(response.status_code, 200) self.assertEqual(len(response.context['comp_list']), 1) @@ -107,7 +107,7 @@ class DuckBookingTest(TestCase): def send_booking_json(self, json_data): return self.client.post( - '/api/duck/book/', + '/api/v1/duck/book/', json.dumps(json_data), HTTP_X_REQUESTED_WITH = 'XMLHttpRequest', content_type = 'application/json') diff --git a/duckbook/urls.py b/duckbook/urls.py index 67af7c1..c22cfb5 100644 --- a/duckbook/urls.py +++ b/duckbook/urls.py @@ -1,6 +1,6 @@ +from django.conf import settings from django.conf.urls import patterns, include, url from django.contrib import admin -from django.conf import settings from django.views.decorators.cache import cache_page from django_js_reverse.views import urls_js @@ -21,6 +21,6 @@ urlpatterns = patterns( ), url(r'^admin/', include(admin.site.urls)), url(r'^accounts/', include('accounts.urls', namespace = 'accounts')), - url(r'^api/', include('api.urls', namespace = 'api')), + url(r'^api/v1/', include('api.urls', namespace = 'api')), url('', include('booking.urls', namespace = 'booking')), )