1212@pytest .fixture
1313def mock_mng_indicator_data ():
1414 class Indicator :
15- def __init__ (self , id , name , short_name , unit , type_ , temporality , description , enable , registered_at , updated_at ):
15+ def __init__ (self , id , name , short_name , unit , type_ , temporality , indicator_category_id , description , enable , registered_at , updated_at ):
1616 self .id = id
1717 self .name = name
1818 self .short_name = short_name
1919 self .unit = unit
2020 self .type = type_
2121 self .temporality = temporality
22+ self .indicator_category_id = indicator_category_id
2223 self .description = description
2324 self .enable = enable
2425 self .registered_at = registered_at
2526 self .updated_at = updated_at
2627 return [
27- Indicator (1 , "consecutive_rainy_days" , "crd" , "days" , "CLIMATE" , "MONTHLY" , "desc" , True , "2024-01-01T00:00:00" , "2024-01-02T00:00:00" ),
28- Indicator (2 , "precipitation" , "prec" , "mm" , "CLIMATE" , "MONTHLY" , "desc" , True , "2024-01-01T00:00:00" , "2024-01-02T00:00:00" )
28+ Indicator (1 , "consecutive_rainy_days" , "crd" , "days" , "CLIMATE" , "MONTHLY" , 1 , "desc" , True , "2024-01-01T00:00:00" , "2024-01-02T00:00:00" ),
29+ Indicator (2 , "precipitation" , "prec" , "mm" , "CLIMATE" , "MONTHLY" , 1 , "desc" , True , "2024-01-01T00:00:00" , "2024-01-02T00:00:00" )
2930 ]
3031
3132def test_get_mng_by_name (mock_mng_indicator_data ):
@@ -41,6 +42,7 @@ def test_get_mng_by_name(mock_mng_indicator_data):
4142 assert "unit" in item
4243 assert "type" in item
4344 assert "temporality" in item
45+ assert "indicator_category_id" in item
4446 assert "description" in item
4547 assert "enable" in item
4648 assert "registered_at" in item
0 commit comments