-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_project.py
24 lines (23 loc) · 932 Bytes
/
test_project.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import unittest
from project import monster_cleaner, weapon_cleaner, region_cleaner
class TestProjectFunctions(unittest.TestCase):
def test_normal_monster(self):
result = monster_cleaner('anjanath')
self.assertEqual(result, "Anjanath")
def test_normal_region(self):
result = region_cleaner('tundra')
self.assertEqual(result, "Hoarfrost Reach")
def test_normal_weapon(self):
result = weapon_cleaner('hbg')
self.assertEqual(result, "Heavy Bowgun")
def test_abnormal_monster(self):
result = monster_cleaner('pickle')
self.assertEqual(result, "Savage Deviljho")
def test_abnormal_region(self):
result = region_cleaner('r o t t e d')
self.assertEqual(result, "Rotten Vale")
def test_abnormal_weapon(self):
result = weapon_cleaner('bOw')
self.assertEqual(result, "Bow")
if __name__ == '__main__':
unittest.main()