コード例 #1
0
 def setUp(self):
     BaseTestCase.setUp(self)
     self.user = User.objects.get(username='******')
     self.profile = Profile.objects.create(
         user=self.user,
         description='Description',
         location='Location',
         website='http://www.pculture.org/')
コード例 #2
0
 def setUp(self):
     BaseTestCase.setUp(self)
     self.user = User.objects.get(username='******')
     self.profile = Profile.objects.create(
         user=self.user,
         description='Description',
         location='Location',
         website='http://www.pculture.org/')
コード例 #3
0
 def setUp(self):
     BaseTestCase.setUp(self)
     notice_type = notification.NoticeType.objects.get(
         label='admin_queue_daily')
     for username in 'admin', 'superuser':
         user = User.objects.get(username=username)
         setting = notification.get_notification_setting(user, notice_type,
                                                         "1")
         setting.send = True
         setting.save()
コード例 #4
0
    def setUp(self):
        BaseTestCase.setUp(self)
        self.user = User.objects.get(username='******')
        self.list = Playlist.objects.create(
            user=self.user,
            name='Test List',
            slug='test-list',
            description="This is a list for testing")

        self.video_set = [Video.objects.create(
                site=self.site_location.site,
                name='Test Video %i' % i) for i in range(5)]

        for index, video in enumerate(self.video_set[::-1]): # reverse order
            PlaylistItem.objects.create(
                playlist=self.list,
                video=video,
                _order=index)