Exemple #1
0
 def test_type_casting_list(self):
     """
     Tests List
     """
     view = TypePhotoCastingDataList.as_view()
     request = self.request_factory.get(reverse('photo_casting_data_types'))
     request.user = self.user
     response = view(request)
     self.assertEqual(response.status_code, 200)
     content = json.loads(response._container[0])
     self.assertEqual(len(content.get('types')), 3)
Exemple #2
0
 def test_type_casting_list(self):
     """
     Tests List
     """
     view = TypePhotoCastingDataList.as_view()
     request = self.request_factory.get(
         reverse('photo_casting_data_types')
     )
     request.user = self.user
     response = view(request)
     self.assertEqual(response.status_code, 200)
     content = json.loads(response._container[0])
     self.assertEqual(len( content.get('types')), 3)
# -*- coding: utf-8 -*-

from django.conf.urls import url, patterns
from apps.sp.views.panel.PhotoCasting import TypePhotoCastingDataList, \
    UsePhotoDataList

urlpatterns = patterns(
    '',
    url(r'^data-types/$',
        TypePhotoCastingDataList.as_view(),
        name='photo_casting_data_types'),
    url(r'^use-photo/$',
        UsePhotoDataList.as_view(),
        name='photo_casting_use_photos'),
)
# -*- coding: utf-8 -*-

from django.conf.urls import url, patterns
from apps.sp.views.panel.PhotoCasting import TypePhotoCastingDataList, \
    UsePhotoDataList


urlpatterns = patterns('',
                       url(r'^data-types/$',
                           TypePhotoCastingDataList.as_view(),
                           name='photo_casting_data_types'),
                       url(r'^use-photo/$',
                           UsePhotoDataList.as_view(),
                           name='photo_casting_use_photos'),
                       )