Skip to content

Commit

Permalink
FIX (unit test): Character level misconfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
KOOKIIEStudios committed Sep 15, 2022
1 parent 3108b00 commit 90ea982
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions unit_test/SQLScripts/create_tester_accounts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ INSERT INTO `characters` (`id`, `accountid`, `name`, `level`, `str`, `dex`, `luk
`int`, `hp`, `mp`, `maxhp`, `maxmp`, `hair`, `face`, `map`, `rankpoint`, `gp`, `soul`, `chatban`)
VALUES (900001, 90001, 'tester0x00', 249, 40, 4, 4,
4, 500, 500, 500, 500, 36786, 23300, 253000000, 0, 0, 0, 'false')
ON DUPLICATE KEY UPDATE `accountid`=90001, `name`='tester0x00', `level`=10, `str`=40, `dex`=4, `luk`=4,
ON DUPLICATE KEY UPDATE `accountid`=90001, `name`='tester0x00', `level`=249, `str`=40, `dex`=4, `luk`=4,
`int`=4, `hp`=500, `mp`=500, `maxhp`=500, `maxmp`=500, `hair`=36786, `face`=23300, `map`=253000000, `rankpoint`=0, `gp`=0, `soul`=0, `chatban`='false';

-- Create admin tester character with Character ID of 900,002
INSERT INTO `characters` (`id`, `accountid`, `name`, `level`, `str`, `dex`, `luk`,
`int`, `hp`, `mp`, `maxhp`, `maxmp`, `hair`, `face`, `map`, `rankpoint`, `gp`, `soul`, `chatban`)
VALUES (900002, 90002, 'tester0x01', 250, 40, 4, 4,
4, 500, 500, 500, 500, 36786, 23300, 253000000, 0, 0, 0, 'false')
ON DUPLICATE KEY UPDATE `accountid`=90002, `name`='tester0x01', `level`=10, `str`=40, `dex`=4, `luk`=4,
ON DUPLICATE KEY UPDATE `accountid`=90002, `name`='tester0x01', `level`=250, `str`=40, `dex`=4, `luk`=4,
`int`=4, `hp`=500, `mp`=500, `maxhp`=500, `maxmp`=500, `hair`=36786, `face`=23300, `map`=253000000, `rankpoint`=0, `gp`=0, `soul`=0, `chatban`='false';

-- Allocate Inventory slots for character with Character ID of 900,001
Expand Down
2 changes: 1 addition & 1 deletion unit_test/tests/character_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_fetch_char_class_id(char, expected):
f"Job ID test failed! Job ID: {char.job}; Type: {type(char.job)}"


@pytest.mark.parametrize("expected", [10])
@pytest.mark.parametrize("expected", [249])
def test_fetch_char_level(char, expected):
assert char.level == expected, \
f"Character level test failed! Level count: {char.level}; Type: {type(char.level)}"
Expand Down

1 comment on commit 90ea982

@KOOKIIEStudios
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passed all unit tests

image

Please sign in to comment.