Esempio n. 1
0
    def test_normative_stance_no_norm(self):
        """Verifies function returns False when the Issue has no norm."""
        stance = Stance()
        stance.issue = "decision_analyze_test_no_norm"

        result = stance_analyze.normative_stance(stance)
        self.assertFalse(result)
Esempio n. 2
0
    def test_normative_stance_not_in_db(self):
        """Verifies function returns False when the norm is not in the DB."""
        stance = Stance()
        stance.issue = "I Don't Exist"

        result = stance_analyze.normative_stance(stance)
        self.assertFalse(result)
Esempio n. 3
0
    def test_normative_stance_norm_match(self):
        """Verifies function returns True when the stance matches the norm."""
        stance = Stance()
        stance.issue = "decision_analyze_test_norm"
        stance.side = outcomes.PRO

        result = stance_analyze.normative_stance(stance)
        self.assertTrue(result)
Esempio n. 4
0
    def test_normative_stance_norm_doesnt_match(self):
        """Verifies function returns False when the stance does not match the norm."""
        stance = Stance()
        stance.issue = "decision_analyze_test_norm"
        stance.side = outcomes.CON

        result = stance_analyze.normative_stance(stance)
        self.assertFalse(result)