mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Parser factory raises value error on unknown file path 🟥
This commit is contained in:
parent
4d36fce83d
commit
9244689e76
1 changed files with 11 additions and 1 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import pytest
|
||||
|
||||
from backend.condition.parsing.factory import select_parser
|
||||
|
||||
def test_selects_lbwf_parser():
|
||||
|
|
@ -9,4 +11,12 @@ def test_selects_lbwf_parser():
|
|||
actual_class_name = select_parser(file_path_str).__class__.__name__
|
||||
|
||||
# assert
|
||||
assert expected_class_name == actual_class_name
|
||||
assert expected_class_name == actual_class_name
|
||||
|
||||
def test_unknown_filepath_raises_value_error():
|
||||
# arrange
|
||||
file_path_str = "unkown/Example Asset Data.xlsx"
|
||||
|
||||
# act + assert
|
||||
with pytest.raises(ValueError):
|
||||
select_parser(file_path_str)
|
||||
Loading…
Add table
Reference in a new issue