Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ Changelog
Due to this library relying on external content, older versions are not guaranteed to work.
Try to always use the latest version.

.. _v2.4.0:
2.4.0 (2019-11-20)
==================
- Added support for multiple houses per character. Accessible on ``Character.houses`` field.
- ``Character.house`` is now deprecated. It will contain the character's first house or ``None``.

.. _v2.3.4:
2.3.4 (2019-11-14)
==================
Expand Down
1 change: 1 addition & 0 deletions tests/resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ deaths by summons, players, assisted deaths, etcetera.
- [tibiacom_not_found.txt](character/tibiacom_not_found.txt) - A character not found page.
- [tibiacom_title_badges.txt](character/tibiacom_title_badges.txt) - A character with unlocked titles and badges.
- [tibiacom_no_badges_selected.txt](character/tibiacom_no_badges_selected.txt) - A character with no selected badges.
- [tibiacom_multiple_houses.txt](character/tibiacom_multiple_houses.txt) - A character with two houses.
- [tibiadata.json](character/tibiadata.json) - A character on TibiaData, also showing Pvp deaths with assists.
- [tibiadata_deleted.json](character/tibiadata_deleted.json) - A character scheduled for deletion on TibiaData.
- [tibiadata_not_found.json](character/tibiadata_not_found.json) - The response of a character not found on TibiaData.
Expand Down
87 changes: 87 additions & 0 deletions tests/resources/character/tibiacom_multiple_houses.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<div class="BoxContent" style="background-image:url(https://static.tibia.com/images/global/content/scroll.gif);">
<table border="0" cellspacing="1" cellpadding="4" width="100%"><tr bgcolor=#505050><td colspan=2 class=white><b>Character Information</b></td></tr><tr bgcolor=#F1E0C6><td width=20%>Name:</td><td>Sayuri Nowan <div style="float: right"></div></td></tr><tr bgcolor=#D4C0A1><td>Title:</td><td>Silencer (16 titles unlocked)</td></tr><tr bgcolor=#F1E0C6><td>Sex:</td><td>female</td></tr><tr bgcolor=#D4C0A1><td>Vocation:</td><td>Elder Druid</td></tr><tr bgcolor=#F1E0C6><td>Level:</td><td>535</td></tr><tr bgcolor=#D4C0A1><td><nobr>Achievement Points:</nobr></td><td>425</td></tr><tr bgcolor=#F1E0C6><td>World:</td><td>Menera</td></tr><tr bgcolor=#D4C0A1><td>Residence:</td><td>Thais</td></tr><tr bgcolor=#F1E0C6><td>Married To:</td><td><a href="https://www.tibia.com/community/?subtopic=characters&name=Comandante+Dako">Comandante&#160;Dako</a></td></tr><tr bgcolor=#D4C0A1><td>House:</td><td> <a href="https://www.tibia.com/community/?subtopic=houses&amp;page=view&amp;world=Menera&amp;town=Edron&amp;houseid=54025&amp;character=Sayuri+Nowan&amp;action=characters">Cormaya 10</a> (Edron) is paid until Dec&#160;06&#160;2019</td></tr><tr bgcolor=#F1E0C6><td>House:</td><td> <a href="https://www.tibia.com/community/?subtopic=houses&amp;page=view&amp;world=Menera&amp;town=Rathleton&amp;houseid=19009&amp;character=Sayuri+Nowan&amp;action=characters">Old Heritage Estate</a> (Rathleton) is paid until Dec&#160;04&#160;2019</td></tr><tr bgcolor=#D4C0A1><td>Guild&#160;Membership:</td><td>Baiabaia of the <a href="https://www.tibia.com/community/?subtopic=guilds&page=view&GuildName=Baia+Baia&amp;character=Sayuri+Nowan&amp;action=characters">Baia&#160;Baia</a></td></tr><tr bgcolor=#F1E0C6><td>Last Login:</td><td>Nov&#160;19&#160;2019,&#160;23:08:03&#160;CET</td></tr><tr bgcolor=#D4C0A1><td valign=top>Comment:</td><td>TibiaLottery-848B3 </td></tr><tr bgcolor=#F1E0C6><td>Account&#160;Status:</td><td>Premium Account</td></tr></table>
<br /><br /><table border="0" cellspacing="1" cellpadding="4" width="100%"><tr bgcolor="#505050"><td colspan="2" class="white"><b>Account Achievements</b></td></tr><tr bgcolor="#F1E0C6"><td><img style="width:18px;height:18px;margin-right:2px;" src="https://static.tibia.com/images/global/general/achievement-grade-symbol.gif" alt="Tibia Achievement" /><img style="width:18px;height:18px;margin-right:2px;" src="https://static.tibia.com/images/global/general/achievement-grade-symbol.gif" alt="Tibia Achievement" /></td><td width="80%">Exemplary Citizen</td></tr><tr bgcolor="#D4C0A1"><td><img style="width:18px;height:18px;margin-right:2px;" src="https://static.tibia.com/images/global/general/achievement-grade-symbol.gif" alt="Tibia Achievement" /><img style="width:18px;height:18px;margin-right:2px;" src="https://static.tibia.com/images/global/general/achievement-grade-symbol.gif" alt="Tibia Achievement" /></td><td width="80%">Ruthless</td></tr><tr bgcolor="#F1E0C6"><td><img style="width:18px;height:18px;margin-right:2px;" src="https://static.tibia.com/images/global/general/achievement-grade-symbol.gif" alt="Tibia Achievement" /><img style="width:18px;height:18px;margin-right:2px;" src="https://static.tibia.com/images/global/general/achievement-grade-symbol.gif" alt="Tibia Achievement" /></td><td width="80%">True Lightbearer<img style="position:absolute;width:44px;height:20px;margin-left:12px;margin-top:-2px;right:35px" src="https://static.tibia.com/images/global/general/achievement-secret-symbol.gif" alt="Tibia Secret Achievement" /></td></tr><tr bgcolor="#D4C0A1"><td><img style="width:18px;height:18px;margin-right:2px;" src="https://static.tibia.com/images/global/general/achievement-grade-symbol.gif" alt="Tibia Achievement" /><img style="width:18px;height:18px;margin-right:2px;" src="https://static.tibia.com/images/global/general/achievement-grade-symbol.gif" alt="Tibia Achievement" /></td><td width="80%">Turncoat<img style="position:absolute;width:44px;height:20px;margin-left:12px;margin-top:-2px;right:35px" src="https://static.tibia.com/images/global/general/achievement-secret-symbol.gif" alt="Tibia Secret Achievement" /></td></tr></table><br /><br /><table border="0" cellspacing="1" cellpadding="4" width="100%"><tr bgcolor="#505050"><td colspan="2" class="white"><b>Account Information</b></td></tr><tr bgcolor="#F1E0C6"><td width="20%">Loyalty Title:</td><td>Warrior of Tibia</td></tr><tr bgcolor="#D4C0A1"><td width="20%">Created:</td><td>Mar&#160;21&#160;2006,&#160;08:07:09&#160;CET</td></tr></table><br /><br /><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR=#505050><TD COLSPAN=4 CLASS=white><B>Characters</B></TD></TR><TR BGCOLOR=#D4C0A1><TD><B>Name</B></TD><TD><B>World</B></TD><TD><B>Status</B></TD><TD><B>&#160;</B></TD></TR><TR BGCOLOR=#F1E0C6><TD WIDTH=20%><NOBR>1.&#160;Holy&#160;Henrietta</NOBR></TD><TD WIDTH=10%><NOBR>Astera</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Holy Henrietta">
<INPUT TYPE=image NAME="View Holy Henrietta" ALT="View Holy Henrietta" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#D4C0A1><TD WIDTH=20%><NOBR>2.&#160;Jello&#160;Housekeeper</NOBR></TD><TD WIDTH=10%><NOBR>Astera</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Jello Housekeeper">
<INPUT TYPE=image NAME="View Jello Housekeeper" ALT="View Jello Housekeeper" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#F1E0C6><TD WIDTH=20%><NOBR>3.&#160;Malunita</NOBR></TD><TD WIDTH=10%><NOBR>Astera</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Malunita">
<INPUT TYPE=image NAME="View Malunita" ALT="View Malunita" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#D4C0A1><TD WIDTH=20%><NOBR>4.&#160;Miss&#160;Weasley</NOBR></TD><TD WIDTH=10%><NOBR>Astera</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Miss Weasley">
<INPUT TYPE=image NAME="View Miss Weasley" ALT="View Miss Weasley" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#F1E0C6><TD WIDTH=20%><NOBR>5.&#160;Sa&#160;yu</NOBR></TD><TD WIDTH=10%><NOBR>Mitigera</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Sa yu">
<INPUT TYPE=image NAME="View Sa yu" ALT="View Sa yu" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#D4C0A1><TD WIDTH=20%><NOBR>6.&#160;Santa&#160;Sayu</NOBR></TD><TD WIDTH=10%><NOBR>Garnera</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Santa Sayu">
<INPUT TYPE=image NAME="View Santa Sayu" ALT="View Santa Sayu" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#F1E0C6><TD WIDTH=20%><NOBR>7.&#160;Sashuri</NOBR></TD><TD WIDTH=10%><NOBR>Zunera</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Sashuri">
<INPUT TYPE=image NAME="View Sashuri" ALT="View Sashuri" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#D4C0A1><TD WIDTH=20%><NOBR>8.&#160;Sashurina</NOBR></TD><TD WIDTH=10%><NOBR>Tournament&#160;-&#160;restricted&#160;Store</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Sashurina">
<INPUT TYPE=image NAME="View Sashurina" ALT="View Sashurina" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#F1E0C6><TD WIDTH=20%><NOBR>9.&#160;Sashurita</NOBR></TD><TD WIDTH=10%><NOBR>Tournament&#160;-&#160;regular</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Sashurita">
<INPUT TYPE=image NAME="View Sashurita" ALT="View Sashurita" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#D4C0A1><TD WIDTH=20%><NOBR>10.&#160;Sayu&#160;con&#160;Hat</NOBR></TD><TD WIDTH=10%><NOBR>Jonera</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Sayu con Hat">
<INPUT TYPE=image NAME="View Sayu con Hat" ALT="View Sayu con Hat" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#F1E0C6><TD WIDTH=20%><NOBR>11.&#160;Sayu&#160;en&#160;Gladera</NOBR></TD><TD WIDTH=10%><NOBR>Gladera</NOBR></TD><TD WIDTH=70%>deleted</TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Sayu en Gladera">
<INPUT TYPE=image NAME="View Sayu en Gladera" ALT="View Sayu en Gladera" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#D4C0A1><TD WIDTH=20%><NOBR>12.&#160;Sayu&#160;Gahe</NOBR></TD><TD WIDTH=10%><NOBR>Funera</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Sayu Gahe">
<INPUT TYPE=image NAME="View Sayu Gahe" ALT="View Sayu Gahe" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#F1E0C6><TD WIDTH=20%><NOBR>13.&#160;Sayu&#160;in&#160;Rook</NOBR></TD><TD WIDTH=10%><NOBR>Astera</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Sayu in Rook">
<INPUT TYPE=image NAME="View Sayu in Rook" ALT="View Sayu in Rook" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#D4C0A1><TD WIDTH=20%><NOBR>14.&#160;Sayu&#160;ri</NOBR></TD><TD WIDTH=10%><NOBR>Secura</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Sayu ri">
<INPUT TYPE=image NAME="View Sayu ri" ALT="View Sayu ri" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#F1E0C6><TD WIDTH=20%><NOBR>15.&#160;Sayunabra</NOBR></TD><TD WIDTH=10%><NOBR>Inabra</NOBR></TD><TD WIDTH=70%>deleted</TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Sayunabra">
<INPUT TYPE=image NAME="View Sayunabra" ALT="View Sayunabra" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#D4C0A1><TD WIDTH=20%><NOBR>16.&#160;Sayuri&#160;Nowan</NOBR> <img src='https://static.tibia.com/images//account/maincharacter.png' alt='(Main Character)' title='Main Character' /></TD><TD WIDTH=10%><NOBR>Menera</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Sayuri Nowan">
<INPUT TYPE=image NAME="View Sayuri Nowan" ALT="View Sayuri Nowan" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#F1E0C6><TD WIDTH=20%><NOBR>17.&#160;Sayurina</NOBR></TD><TD WIDTH=10%><NOBR>Menera</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Sayurina">
<INPUT TYPE=image NAME="View Sayurina" ALT="View Sayurina" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR><TR BGCOLOR=#D4C0A1><TD WIDTH=20%><NOBR>18.&#160;Sayurita&#160;en&#160;Gentebrita</NOBR></TD><TD WIDTH=10%><NOBR>Gentebra</NOBR></TD><TD WIDTH=70%><IMG SRC"=https://static.tibia.com/images/global/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0><BR></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=https://www.tibia.com/community/?subtopic=characters METHOD=post><TR><TD>
<INPUT TYPE=hidden NAME=name VALUE="Sayurita en Gentebrita">
<INPUT TYPE=image NAME="View Sayurita en Gentebrita" ALT="View Sayurita en Gentebrita" SRC="https://static.tibia.com/images/global/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE>
</TD></TR></TABLE>
<br /><br /> <FORM ACTION="https://www.tibia.com/community/?subtopic=characters" METHOD=post>
<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
<TR><TD BGCOLOR="#505050" CLASS=white><B>Search Character</B></TD></TR>
<TR><TD BGCOLOR="#D4C0A1"><TABLE BORDER=0 CELLPADDING=1><TR>
<TD>Name:</TD><TD><INPUT NAME="name" VALUE="sayuri nowan" SIZE=29 MAXLENGTH=29></TD>
<TD><INPUT TYPE=image NAME="Submit" SRC="https://static.tibia.com/images/global/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD>
</TR></TABLE></TD></TR>
</TABLE>
</FORM>
</div>
</div>
</div>
15 changes: 15 additions & 0 deletions tests/tests_character.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
FILE_CHARACTER_DEATHS_COMPLEX = "character/tibiacom_deaths_complex.txt"
FILE_CHARACTER_TITLE_BADGES = "character/tibiacom_title_badges.txt"
FILE_CHARACTER_NO_BADGES_SELECTED = "character/tibiacom_no_badges_selected.txt"
FILE_CHARACTER_MULTIPLE_HOUSES = "character/tibiacom_multiple_houses.txt"

FILE_CHARACTER_TIBIADATA = "character/tibiadata.json"
FILE_CHARACTER_TIBIADATA_UNHIDDEN = "character/tibiadata_unhidden.json"
Expand Down Expand Up @@ -128,6 +129,20 @@ def test_character_from_content_no_selected_badges(self):
self.assertEqual(0, len(char.account_badges))
self.assertEqual(0, len(char.former_names))

def test_character_from_content_multiple_houses(self):
"""Testing parsing a character with multiple houses."""
content = self._load_resource(FILE_CHARACTER_MULTIPLE_HOUSES)
char = Character.from_content(content)
self.assertEqual("Sayuri Nowan", char.name)
self.assertEqual(2, len(char.houses))
self.assertEqual(char.house.name, char.houses[0].name)
first_house = char.houses[0]
second_house = char.houses[1]
self.assertEqual("Cormaya 10", first_house.name)
self.assertEqual("Old Heritage Estate", second_house.name)
self.assertEqual("Edron", first_house.town)
self.assertEqual("Rathleton", second_house.town)

def test_character_from_content_unrelated(self):
"""Testing parsing an unrelated tibia.com section"""
content = self._load_resource(self.FILE_UNRELATED_SECTION)
Expand Down
2 changes: 1 addition & 1 deletion tibiapy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from tibiapy.creature import *
from tibiapy.client import *

__version__ = '2.3.4'
__version__ = '2.4.0'

from logging import NullHandler

Expand Down
Loading