示例#1
0
文件: urls.py 项目: kahnjw/mileagebe
from django.conf.urls import patterns, url

from strava_client.views import StravaUser, StravaActivities


urlpatterns = patterns(
    '',
    url(r'me/?$', StravaUser.as_view(), name='strava-me'),
    url(r'activities/?$', StravaActivities.as_view(), name='strava-activites')
)
示例#2
0
文件: tests.py 项目: kahnjw/mileagebe
 def test_strava_user_endpoint_returns_user_data(self):
     response = StravaUser.as_view()(self.request)
     response.render()
     self.assertEqual(json.loads(response.content), {'user': '******'})