# Path: tests/tests/test_cases.py
# class TokenTestCase(OAuthTestCase):
# 
#     def setUp(self):
#         super(TokenTestCase, self).setUp()
# 
#         self.client_secret = self.oauth_client.secret
# 
#         self.authorization_token = AuthorizationToken(user=self.user, client=self.oauth_client)
#         self.authorization_token.save()
# 
#         self.authorization_token.scope = [self.scope]
#         self.authorization_token.save()


    from django.conf.urls import patterns, url
    from django.conf.urls.defaults import patterns, url
from django.http import HttpResponse
from django.utils import unittest
    from rest_framework.permissions import IsAuthenticated
    from rest_framework.views import APIView
    from doac.contrib.rest_framework.authentication import DoacAuthentication
from ..test_cases import TokenTestCase
    import rest_framework
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

try:
    # For Django ≥ 1.4.
except ImportError:
try:
except ImportError:
    rest_framework = None
if rest_framework:



if rest_framework:
    class MockView(APIView):
        authentication_classes = (DoacAuthentication,)

        def get(self, request):
            return HttpResponse('foo')

    urlpatterns = patterns(
        '',
        url(r'^anonymous/$', MockView.as_view()),
        url(r'^authenticated-only/$', MockView.as_view(permission_classes=(IsAuthenticated,))),

# Path: tests/tests/test_cases.py
# class TokenTestCase(OAuthTestCase):
# 
#     def setUp(self):
#         super(TokenTestCase, self).setUp()
# 
#         self.client_secret = self.oauth_client.secret
# 
#         self.authorization_token = AuthorizationToken(user=self.user, client=self.oauth_client)
#         self.authorization_token.save()
# 
#         self.authorization_token.scope = [self.scope]
#         self.authorization_token.save()


# Path: tests/tests/contrib/test_rest_framework.py
    from django.conf.urls import patterns, url
    from django.conf.urls.defaults import patterns, url
from django.http import HttpResponse
from django.utils import unittest
    from rest_framework.permissions import IsAuthenticated
    from rest_framework.views import APIView
    from doac.contrib.rest_framework.authentication import DoacAuthentication
from ..test_cases import TokenTestCase
    import rest_framework

# -*- coding: utf-8 -*-

from __future__ import unicode_literals

try:
    # For Django ≥ 1.4.
except ImportError:
try:
except ImportError:
    rest_framework = None
if rest_framework:



if rest_framework:
    class MockView(APIView):
        authentication_classes = (DoacAuthentication,)

        def get(self, request):
            return HttpResponse('foo')

    urlpatterns = patterns(
        '',
        url(r'^anonymous/$', MockView.as_view()),
        url(r'^authenticated-only/$', MockView.as_view(permission_classes=(IsAuthenticated,))),

    )