@@ -8,7 +8,7 @@ def test_url_no_search(self, endpoint="characters"):
88 url = common .build_url (endpoint )
99 self .assertEqual (url , "https://api.api-onepiece.com/characters" )
1010
11- def test_url_with_search (self , endpoint = "characters" , search = "id" , resource = "1" ):
11+ def test_url_with_search (self , endpoint = "characters" , search = "id" , resource = 1 ):
1212 url = common .build_url (endpoint , search , resource )
1313 self .assertEqual (url , "https://api.api-onepiece.com/characters/1" )
1414
@@ -32,7 +32,7 @@ def test_url_by_title(self, endpoint="episodes", search="title", resource="Je su
3232 url = common .build_url (endpoint , search , resource )
3333 self .assertEqual (url , "https://api.api-onepiece.com/episodes/search/Je%20suis%20Luffy%20!" )
3434
35- def test_url_search_other_id (self , endpoint = "boats" , search = "crew_id" , resource = "1" ):
35+ def test_url_search_other_id (self , endpoint = "boats" , search = "crew_id" , resource = 1 ):
3636 url = common .build_url (endpoint , search , resource )
3737 self .assertEqual (url , "https://api.api-onepiece.com/boats/search/crew/1" )
3838
@@ -51,19 +51,19 @@ def test_endpoint_with_wrong_value(self, endpoint="wrong"):
5151 def test_search_no_resource (self , endpoint = "characters" , search = "id" ):
5252 self .assertRaises (ValueError , common .check_params , endpoint , search )
5353
54- def test_search_with_resource (self , endpoint = "characters" , search = "id" , resource = "1" ):
54+ def test_search_with_resource (self , endpoint = "characters" , search = "id" , resource = 1 ):
5555 self .assertEqual (common .check_params (endpoint , search , resource ), None )
5656
57- def test_search_with_wrong_value (self , endpoint = "characters" , search = "wrong" , resource = "1" ):
57+ def test_search_with_wrong_value (self , endpoint = "characters" , search = "wrong" , resource = 1 ):
5858 self .assertRaises (ValueError , common .check_params , endpoint , search , resource )
5959
6060
6161class TestConvertName (unittest .TestCase ):
62- def test_convert_name (self , name = "Baggy / Le Clown" ):
63- self .assertEqual (common .convert_name (name ), "Baggy" )
62+ def test_convert_resource (self , name = "Baggy / Le Clown" ):
63+ self .assertEqual (common .convert_resource (name ), "Baggy" )
6464
65- def test_convert_name_with_space (self , name = "Baggy / Le Clown " ):
66- self .assertEqual (common .convert_name (name ), "Baggy" )
65+ def test_convert_resource_with_space (self , name = "Baggy / Le Clown " ):
66+ self .assertEqual (common .convert_resource (name ), "Baggy" )
6767
6868
6969class TestEndpointsSearches (unittest .TestCase ):
0 commit comments