@@ -75,23 +75,21 @@ def test_sanitize_url_GIVEN_raw_url_IS_reliable(self) -> None:
7575 """Test case 1: Test to ensure reliable URL sanitization."""
7676 # Mock _hearstep to return a non-empty response
7777 for test_params in self .URL_TEST_FIXTURES :
78+ sanitized_url = docs .utils .sanitize_url (test_params ["input_url" ])
79+ # check for results
80+ self .assertIsNotNone (sanitized_url )
81+ # Verify results
7882 if test_params ["input_url" ] == test_params ["expected" ]:
79- continue
80- else :
81- self .assertNotEqual (
82- test_params ["input_url" ],
83- test_params ["expected" ],
84- "Invalid test case. Input and expected URLs were the same, but not skipped." ,
83+ self .assertEqual (
84+ test_params ["input_url" ], sanitized_url ,
85+ "Input and output URLs were different, should be the same." ,
8586 )
86- sanitized_url = docs .utils .sanitize_url (test_params ["input_url" ])
87- # check for results
88- self .assertIsNotNone (sanitized_url )
89- # Verify results
87+ else :
9088 self .assertNotEqual (
9189 test_params ["input_url" ], sanitized_url ,
92- "Invalid test case. Input and output URLs were the same, should be skipped ." ,
90+ "Input and output URLs were the same, should be different ." ,
9391 )
94- self .assertEqual (sanitized_url , test_params ["expected" ])
92+ self .assertEqual (sanitized_url , test_params ["expected" ])
9593
9694
9795if __name__ == '__main__' :
0 commit comments