def test_use_photo_list(self): """ Tests List """ view = UsePhotoDataList.as_view() request = self.request_factory.get(reverse('photo_casting_use_photos')) request.user = self.user response = view(request) self.assertEqual(response.status_code, 200) content = json.loads(response._container[0]) self.assertEqual(len(content.get('uses')), 10)
def test_use_photo_list(self): """ Tests List """ view = UsePhotoDataList.as_view() request = self.request_factory.get( reverse('photo_casting_use_photos') ) request.user = self.user response = view(request) self.assertEqual(response.status_code, 200) content = json.loads(response._container[0]) self.assertEqual(len( content.get('uses')), 10)
# -*- 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'), )