コード例 #1
0
 def setUp(self):
     super(ViewsEmptyTestCase, self).setUp()
     user = UserFactory(password='******')
     user.is_superuser = True
     user.save()
     self.assertTrue(
         self.client.login(username=user.username, password='******'))
コード例 #2
0
ファイル: test_views.py プロジェクト: chaabni/SmartElect
    def setUp(self):
        super(ViewsNonEmptyTestCase, self).setUp()
        user = UserFactory(password='******')
        user.is_superuser = True
        user.save()
        self.assertTrue(self.client.login(username=user.username, password='******'))

        phase = 'in-person'

        self.input_arguments['phase'] = phase

        with override_settings(ROLLGEN_OUTPUT_DIR=self.faux_output_dir):
            self.job = Job(phase, [self.center], self.input_arguments, self.user.username,
                           self.output_path)
            self.job.generate_rolls()

        self.dirname = os.path.basename(self.job.output_path)
コード例 #3
0
    def setUp(self):
        super(ViewsNonEmptyTestCase, self).setUp()
        user = UserFactory(password='******')
        user.is_superuser = True
        user.save()
        self.assertTrue(
            self.client.login(username=user.username, password='******'))

        phase = 'in-person'

        self.input_arguments['phase'] = phase

        with override_settings(ROLLGEN_OUTPUT_DIR=self.faux_output_dir):
            self.job = Job(phase, [self.center], self.input_arguments,
                           self.user.username, self.output_path)
            self.job.generate_rolls()

        self.dirname = os.path.basename(self.job.output_path)
コード例 #4
0
ファイル: test_views.py プロジェクト: chaabni/SmartElect
 def setUp(self):
     super(ViewsEmptyTestCase, self).setUp()
     user = UserFactory(password='******')
     user.is_superuser = True
     user.save()
     self.assertTrue(self.client.login(username=user.username, password='******'))