def test__match_stances_helper_match_stances(self):
        """ Verifies member.stances stances are matched."""
        member = self.generate_member_with_stances()
        stances = member.stances

        result = member_analyze._match_stances_helper(member, stances)
        self.assertEqual(result, stances)
    def test__match_stances_helper_match_multiple_stances(self):
        """ Verifies member stances from multiple sources are matched."""
        member = self.generate_member_with_stances()
        stances = member.credo + member.pro_rel_stances

        result = member_analyze._match_stances_helper(member, stances)
        for entry in result:
            self.assertTrue(entry in stances)
    def test__match_stances_helper_extra_stances(self):
        """ Verifies that extra stances in the filter stances list are not added."""
        member = self.generate_member_with_stances()
        stances = member.credo + member.pro_rel_stances

        stance = Stance()
        stance.issue = "Not Found"
        stance.side = outcomes.PRO
        stances.append(stance)

        result = member_analyze._match_stances_helper(member, stances)
        answer = member.credo + member.pro_rel_stances
        for entry in result:
            self.assertTrue(entry in answer)