def test_process_string_code_with_decimal_digit_error(self): """ Tests code_reader's process_string_code function with wrong decimal number. """ test_code = " _ _ _ _ _ _ _ _ _ " \ "|_ _ |_ |_ |_ |_ |_ |_ |_ " \ " _| _| _| _| | _| _| _| _ " result = bank_ocr.process_string_code(test_code) self.assertEqual(result, "5?55?555?", "The processed code should be 5?55?555?")
def test_process_string_code_with_hexadecimal_digit_error(self): """ Tests code_reader's process_string_code function with wrong hexadecimal number. """ test_code = " _ _ _ _ _ _ _ _ " \ "|_||_|| |_ | |_| | | " \ "| | ||_ |_ | | ||_ |_ |_ " result = bank_ocr.process_string_code(test_code) self.assertEqual(result, "??CE?A?CC", "The processed code should be ??CE?A?CC")
def test_process_string_code_with_hexadecimal_and_decimal(self): """ Tests code_reader's process_string_code function with hexadecimal and decimal number. """ test_code = " _ _ _ _ _ _ _ _ _ " \ "|_| || |_ |_ |_|| || || " \ "| | ||_ |_ | | ||_||_||_ " result = bank_ocr.process_string_code(test_code) self.assertEqual(result, "A7CEFA00C", "The processed code should be A7CEFA00C")
def test_process_string_code_with_decimal(self): """ Tests code_reader's process_string_code function with decimal number. """ test_code = " " \ " | | | | | | | | |" \ " | | | | | | | | |" result = bank_ocr.process_string_code(test_code) self.assertEqual(result, "111111111", "The processed code should be 111111111")