chore: add flake8 by kaioduarte · Pull Request #236 · brazilian-utils/python

Expand Up @@ -30,7 +30,8 @@ def test_is_valid_landline(self): # When landline phone's second digit is 0, returns False self.assertIs(is_valid_landline("1038814933"), False)
# When landline phone's third digit is different of 2,3,4 or 5, returns False # When landline phone's third digit is different of 2,3,4 or 5, # returns False self.assertIs(is_valid_landline("1998814933"), False)
# When landline phone is valid Expand Down Expand Up @@ -75,7 +76,8 @@ def test_is_valid(self): # When landline phone is_valid, returns True self.assertIs(is_valid("1958814933"), True)
# Checks if function is_valid_landline is called with the correct argument # Checks if function is_valid_landline is called with the # correct argument mock_is_valid_landline.assert_called_once_with("1958814933") # Checks if function is_valid_mobile is not called mock_is_valid_mobile.assert_not_called() Expand All @@ -90,9 +92,11 @@ def test_is_valid(self): # When mobile phone is_valid, returns True self.assertIs(is_valid("11994029275"), True)
# Checks if function is_valid_landline is called with the correct argument # Checks if function is_valid_landline is called with the # correct argument mock_is_valid_landline.assert_called_once_with("11994029275") # Checks if function is_valid_mobile is called with the correct argument # Checks if function is_valid_mobile is called with the # correct argument mock_is_valid_mobile.assert_called_once_with("11994029275")
# Mock is_valid_landline to return False, is_valid_mobile return False Expand All @@ -105,9 +109,11 @@ def test_is_valid(self): # When landline phone isn't valid, returns False self.assertIs(is_valid("11994029275"), False)
# Checks if function is_valid_landline is called with the correct argument # Checks if function is_valid_landline is called with the # correct argument mock_is_valid_landline.assert_called_once_with("11994029275") # Checks if function is_valid_mobile is called with the correct argument # Checks if function is_valid_mobile is called with the # correct argument mock_is_valid_mobile.assert_called_once_with("11994029275")
def test_remove_symbols_phone(self): Expand All @@ -117,7 +123,8 @@ def test_remove_symbols_phone(self): # When there are no symbols to remove, it returns the same string self.assertEqual(remove_symbols_phone("21994029275"), "21994029275")
# When there are symbols to remove, it returns the string without symbols # When there are symbols to remove, it returns the string without # symbols self.assertEqual(remove_symbols_phone("(21)99402-9275"), "21994029275") self.assertEqual(remove_symbols_phone("(21)2569-6969"), "2125696969")
Expand All @@ -126,10 +133,12 @@ def test_remove_symbols_phone(self): remove_symbols_phone("(21) 99402-9275!"), "21994029275!" )
# When the string contains non-numeric characters, it returns the string without the specified symbols # When the string contains non-numeric characters, it returns the # string without the specified symbols self.assertEqual(remove_symbols_phone("(21)ABC-DEF"), "21ABCDEF")
# When the phone number contains a plus symbol and spaces, they are removed # When the phone number contains a plus symbol and spaces, they are # removed self.assertEqual( remove_symbols_phone("+55 21 99402-9275"), "5521994029275" ) Expand All @@ -139,7 +148,8 @@ def test_remove_symbols_phone(self): remove_symbols_phone("55 21 99402 9275"), "5521994029275" )
# When the phone number contains a mixture of all specified symbols, all are removed # When the phone number contains a mixture of all specified symbols, # all are removed self.assertEqual( remove_symbols_phone("+55 (21) 99402-9275"), "5521994029275" ) Expand Down