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') )
def test_strava_user_endpoint_returns_user_data(self): response = StravaUser.as_view()(self.request) response.render() self.assertEqual(json.loads(response.content), {'user': '******'})