Ejemplo n.º 1
0
 def test_advance_relationship(self):
     luke_black = Relationship(['Luke', 'Black'], preset_couple_stats['Luke,Black']['stats'])
     kota_onsen = Relationship(['Kota', 'Onsen'], preset_couple_stats['Kota,Onsen']['stats'])
     rel_list = RelationshipList()
     rel_list.add_relationship(luke_black)
     rel_list.add_relationship(kota_onsen)
     current_maxes = {'Luke,Black': 2, 'Kota,Onsen': 2}
     available_guests = ['Luke', 'Black', 'Onsen', 'Kota']
     rel_list.advance_relationship('Kota,Onsen')
     choices, couples = rel_list.get_available_couple_routes(available_guests, available_guests, current_maxes)
     self.assertEqual(choices, [("Luke and Black's scene #0", 'Luke_Black_0'), ("Kota and Onsen's scene #1", 'Kota_Onsen_1')])
     self.assertEqual(couples, [('Luke', 'Black'), ('Kota', 'Onsen')])
     rel_list.advance_relationship('Kota,Onsen', max_progress=2)
     choices, couples = rel_list.get_available_couple_routes(available_guests, available_guests, current_maxes)
     self.assertEqual(rel_list.get_relationship_status('Kota,Onsen'), 'complete')
     self.assertEqual(choices, [("Luke and Black's scene #0", 'Luke_Black_0')])
     self.assertEqual(couples, [('Luke', 'Black')])
Ejemplo n.º 2
0
 def test_cant_meet_guest_requirements(self):
     luke_black = Relationship(['Luke', 'Black'], preset_couple_stats['Luke,Black']['stats'])
     kota_onsen = Relationship(['Kota', 'Onsen'], preset_couple_stats['Kota,Onsen']['stats'])
     rel_list = RelationshipList()
     rel_list.add_relationship(luke_black)
     rel_list.add_relationship(kota_onsen)
     current_maxes = {'Luke,Black': 2, 'Kota,Onsen': 2}
     available_guests = ['Luke', 'Black', 'Onsen']
     choices, couples = rel_list.get_available_couple_routes(available_guests, available_guests, current_maxes)
     self.assertEqual(choices, [("Luke and Black's scene #0", 'Luke_Black_0')])
     self.assertEqual(couples, [('Luke', 'Black')])
Ejemplo n.º 3
0
 def test_stopped_by_current_maxes(self):
     luke_black = Relationship(['Luke', 'Black'], preset_couple_stats['Luke,Black']['stats'])
     kota_onsen = Relationship(['Kota', 'Onsen'], preset_couple_stats['Kota,Onsen']['stats'])
     rel_list = RelationshipList()
     rel_list.add_relationship(luke_black)
     rel_list.add_relationship(kota_onsen)
     rel_list.advance_relationship('Luke,Black', max_progress=3)
     current_maxes = {'Luke,Black': 1, 'Kota,Onsen': 2}
     available_guests = ['Luke', 'Black', 'Kota', 'Onsen']
     choices, couples = rel_list.get_available_couple_routes(available_guests, available_guests, current_maxes)
     self.assertEqual(choices, [("Kota and Onsen's scene #0", 'Kota_Onsen_0')])
     self.assertEqual(couples, [('Kota', 'Onsen')])