Example #1
0
 def test_normal(self, value, replace_text, expected):
     sanitized_name = sanitize_excel_sheet_name(value, replace_text)
     assert sanitized_name == expected
     validate_excel_sheet_name(sanitized_name)
Example #2
0
 def test_exception(self, value, expected):
     with pytest.raises(expected):
         validate_excel_sheet_name(value)
Example #3
0
 def test_exception_invalid_char(self, value):
     with pytest.raises(InvalidCharError):
         validate_excel_sheet_name(value)
Example #4
0
 def test_normal_multibyte(self, value):
     validate_excel_sheet_name(value)
Example #5
0
 def test_normal(self, value):
     validate_excel_sheet_name(value)
Example #6
0
 def test_exception_invalid_char(self, value):
     with pytest.raises(ValidationError) as e:
         validate_excel_sheet_name(value)
     assert e.value.reason == ErrorReason.INVALID_CHARACTER