コード例 #1
0
ファイル: test_experiments.py プロジェクト: eiritana/canvas
    def test_logged_in_only_experiments_return_control_even_if_forced_when_logged_out(
            self):
        request = FakeRequest(AnonymousUser())
        force_into_branch(request, "logged_in_only", "experimental")

        self.assertTrue(request.experiments.is_in("logged_in_only", "control"))
コード例 #2
0
ファイル: test_experiments.py プロジェクト: eiritana/canvas
    def test_staff_can_be_forced_into_experiment(self):
        request = FakeRequest(create_user(staff=True))
        force_into_branch(request, "forced_into_experimental", "control")

        self.assertTrue(
            request.experiments.is_in("forced_into_experimental", "control"))
コード例 #3
0
ファイル: test_experiments.py プロジェクト: eiritana/canvas
    def test_forced_into_experiment(self):
        request = FakeRequest()
        force_into_branch(request, "forced_into_control", "experimental")

        self.assertTrue(
            request.experiments.is_in("forced_into_control", "experimental"))
コード例 #4
0
    def test_staff_can_be_forced_into_experiment(self):
        request = FakeRequest(create_user(staff=True))
        force_into_branch(request, "forced_into_experimental", "control")

        self.assertTrue(request.experiments.is_in("forced_into_experimental", "control"))
コード例 #5
0
    def test_forced_into_experiment(self):
        request = FakeRequest()
        force_into_branch(request, "forced_into_control", "experimental")

        self.assertTrue(request.experiments.is_in("forced_into_control", "experimental"))
コード例 #6
0
    def test_logged_in_only_experiments_return_control_even_if_forced_when_logged_out(self):
        request = FakeRequest(AnonymousUser())
        force_into_branch(request, "logged_in_only", "experimental")

        self.assertTrue(request.experiments.is_in("logged_in_only", "control"))