def generate_stance_array(self): """Generates the stance array for the _compare_stance tests""" stance1 = Stance() stance1.importance = importance.B relation1 = Relation() relation1.importance = importance.C stance1.relation = relation1 stance2 = Stance() stance2.importance = importance.B relation2 = Relation() relation2.importance = importance.A stance2.relation = relation2 stance3 = Stance() stance3.importance = importance.C relation3 = Relation() relation3.importance = importance.B stance3.relation = relation3 stance4 = Stance() stance4.importance = importance.D relation4 = Relation() relation4.importance = importance.A stance4.relation = relation4 return [stance1, stance2, stance3, stance4]
def generate_stance(self, stance_importance, relation_importance): """Generates stances for testing with sort keys""" stance = Stance() stance.importance = stance_importance relation = Relation() relation.importance = relation_importance stance.relation = relation stance.sort_key = stance_sort_key.LOYALTY return stance