コード例 #1
0
 def test_remove_ssn_empty_input(self):
     # Setup
     input_text = ''
     expected_output = ''
     # Actual call
     output_text = remove_ssn(input_text)
     # Asserts
     self.assertEqual(output_text, expected_output)
コード例 #2
0
 def test_remove_ssn_no_ssn(self):
     # Setup
     input_text = "Hello world!"
     expected_output = "Hello world!"
     # Actual call
     output_text = remove_ssn(input_text)
     # Asserts
     self.assertEqual(output_text, expected_output)
コード例 #3
0
 def test_remove_ssn_all_ssns(self):
     # Setup
     input_text = '574-76-3766, 664-20-8576, 481-94-4099, 585-60-3079, 541714785'
     expected_output = ', , , , '
     # Actual call
     output_text = remove_ssn(input_text)
     # Asserts
     self.assertEqual(output_text, expected_output)
コード例 #4
0
 def test_remove_ssn(self):
     # Setup
     input_text = "My social security is 770-12-3456"
     expected_output = "My social security is "
     # Actual call
     output_text = remove_ssn(input_text)
     # Asserts
     self.assertEqual(output_text, expected_output)