Commits

Thomas Johansson committed 4f05ab4

Update tests to use the included OAuth url patterns.

Comments (0)

Files changed (2)

tests/test_project/apps/testapp/tests.py

 class OAuthTests(MainTests):
     signature_method = oauth.SignatureMethod_HMAC_SHA1()
     callback_url = 'http://example.com/cb'
-    request_token_url = 'http://testserver/api/oauth/request_token'
-    authorize_url = 'http://testserver/api/oauth/authorize'
-    access_token_url = 'http://testserver/api/oauth/access_token'
+    request_token_url = 'http://testserver/api/oauth/get_request_token'
+    authorize_url = 'http://testserver/api/oauth/authorize_request_token'
+    access_token_url = 'http://testserver/api/oauth/get_access_token'
     api_access_url = 'http://testserver/api/oauth/api_access'
 
     def setUp(self):

tests/test_project/apps/testapp/urls.py

 
     url(r'^multiauth/$', multiauth),
 
-    # oauth entrypoints
-    url(r'^oauth/request_token$', 'piston.authentication.oauth.views.get_request_token'),
-    url(r'^oauth/authorize$', 'piston.authentication.oauth.views.authorize_request_token'),
-    url(r'^oauth/access_token$', 'piston.authentication.oauth.views.get_access_token'),
+    # OAuth
+    url(r'^oauth/', include('piston.authentication.oauth.urls')),
     url(r'^oauth/api_access$', ouath_access),
 
     url(r'^list_fields$', list_fields),