forked from RocketMap/RocketMap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow encounter white/blacklist to be specified by name in a file (Ro…
…cketMap#1768) * Allow encounter white/blacklist to be specified by name in a file * black != white
- Loading branch information
1 parent
f24516a
commit 0d57009
Showing
3 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import unittest | ||
from pogom import utils | ||
|
||
|
||
class UtilsTest(unittest.TestCase): | ||
def test_get_pokemon_id(self): | ||
self.assertEqual(1, utils.get_pokemon_id("Bulbasaur")) | ||
self.assertEqual(149, utils.get_pokemon_id("Dragonite")) | ||
|
||
# Unknown name returns -1 | ||
self.assertEqual(-1, utils.get_pokemon_id("Unknown")) | ||
|
||
def test_get_pokemon_name(self): | ||
self.assertEqual("Bulbasaur", utils.get_pokemon_name(1)) | ||
self.assertEqual("Dragonite", utils.get_pokemon_name(149)) | ||
|
||
# Unknown ID raises KeyError | ||
self.assertRaises(KeyError, utils.get_pokemon_name, 12367) |