Ejemplo n.º 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)
Ejemplo n.º 2
0
 def test_exception(self, value, expected):
     with pytest.raises(expected):
         validate_excel_sheet_name(value)
Ejemplo n.º 3
0
 def test_exception_invalid_char(self, value):
     with pytest.raises(InvalidCharError):
         validate_excel_sheet_name(value)
Ejemplo n.º 4
0
 def test_normal_multibyte(self, value):
     validate_excel_sheet_name(value)
Ejemplo n.º 5
0
 def test_normal(self, value):
     validate_excel_sheet_name(value)
Ejemplo n.º 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