예제 #1
0
 def setUp2(self):
     tutils.create_std_forums()
     self.rikimaru = tutils.create_user(thread_count=1, post_count=0)
     self.post = self.rikimaru.post_set.all()[0]
     self.post.created = self.post.created - timedelta(days=4)
     self.post.has_been_edited = True
     self.post.save()
예제 #2
0
 def setUp2(self):
     tutils.create_std_forums()
     self.scrub = tutils.create_user(thread_count=1, post_count=0)
     self.thread = Thread.objects.get(author=self.scrub)
     self.scrub_client = Client()
     self.scrub_client.force_login(self.scrub)
     self.path = reverse('new-reply', args=(self.thread.pk, ))
     self.limit = utils.get_config('initial_account_period_limit')
예제 #3
0
    def setUp(self):
        tutils.create_std_forums()

        self.scrub = tutils.create_user(thread_count=5, post_count=10)
        self.scrub.auto_subscribe = 1
        self.scrub.save()

        self.scrub_client = Client()
        self.scrub_client.force_login(self.scrub)
예제 #4
0
    def setUp(self):
        tutils.create_std_forums()

        self.tu_1 = tutils.create_user(thread_count=1)
        self.tu_2 = tutils.create_user()

        self.thread = Thread.objects.filter(author=self.tu_1)[0]
        self.thread.subscribe(self.tu_1)
        self.thread.mark_read(self.tu_1)
예제 #5
0
    def setUp2(self):
        tutils.create_std_forums()

        self.admin = tutils.create_user()
        self.anon_client = Client()

        self.reg_code = RegistrationCode()
        self.reg_code.generated_by = self.admin
        self.reg_code.save()

        self.path = reverse('register-with-code')
예제 #6
0
    def setUp2(self):
        tutils.create_std_forums()

        self.don = tutils.create_user(thread_count=1, post_count=1)
        self.fran = tutils.create_user(thread_count=0, post_count=0)

        self.thread = Thread.objects.all()[0]
        self.thread.subscribe(self.don)

        self.thread.mark_read(self.don, self.thread.get_last_post())

        self.don_client = Client()
        self.don_client.force_login(self.don)
예제 #7
0
    def setUp(self):
        tutils.create_std_forums()

        self.don = tutils.create_user(thread_count=1, post_count=1)
        self.fran = tutils.create_user(thread_count=0, post_count=0)
        self.lanny = tutils.create_user(thread_count=0, post_count=0)

        self.lanny.is_staff = True
        self.lanny.is_admin = True
        self.lanny.save()

        self.don_post = self.don.post_set.all()[0]

        self.fran_client = Client()
        self.fran_client.force_login(self.fran)
예제 #8
0
    def setUp(self):
        tutils.create_std_forums()

        self.admin = tutils.create_user()
        self.scrub = tutils.create_user(thread_count=1, post_count=10)

        self.admin.is_admin = True
        self.admin.is_staff = True
        self.admin.save()

        self.thread = Thread.objects.all()[0]

        self.scrub_client = Client()
        self.scrub_client.force_login(self.scrub)
        self.admin_client = Client()
        self.admin_client.force_login(self.admin)
예제 #9
0
    def setUp(self):
        self.limit = utils.get_config()['initial_account_period_total'] = 3

        tutils.create_std_forums()

        self.thankee = tutils.create_user(thread_count=1, post_count=4)
        self.thanker = tutils.create_user(post_count=4)
        self.noob_thanker = tutils.create_user(post_count=1)

        self.thanker_client = Client()
        self.thanker_client.force_login(self.thanker)

        self.noob_thanker_client = Client()
        self.noob_thanker_client.force_login(self.noob_thanker)

        self.thankee_client = Client()
        self.thankee_client.force_login(self.thankee)

        self.url = reverse('thank-post',
                           args=(self.thankee.post_set.all()[0].pk, ))
예제 #10
0
    def setUp(self):
        tutils.create_std_forums()

        self.admin = tutils.create_user()
        self.scrub = tutils.create_user()

        self.admin.is_admin = True
        self.admin.is_staff = True
        self.admin.save()

        self.admin_client = Client()
        self.admin_client.force_login(self.admin)
        self.scrub_client = Client()
        self.scrub_client.force_login(self.scrub)

        auth_package = AuthPackage.objects.create(
            logic_package='ADMIN_REQUIRED')

        self.admin_only_forum = Forum.objects.all()[0]
        self.admin_only_forum.create_thread_pack = auth_package
        self.admin_only_forum.save()

        self.limit = utils.get_config()['captcha_period'] = 0
예제 #11
0
 def setUp2(self):
     tutils.create_std_forums()
     self.anon_client = Client()
     self.path = reverse('register')
예제 #12
0
 def setUp2(self):
     tutils.create_std_forums()
     self.scrub = tutils.create_user(thread_count=1, post_count=0)
     self.scrub_client = Client()
     self.scrub_client.force_login(self.scrub)
예제 #13
0
 def setUp(self):
     tutils.create_std_forums()
     self.cmd = CheckDBCommand()