def test_initialization_7(self):
     """test catching error when total capacity cannot be deduced"""
     wt = WindTurbine(**self.test_turbine)
     wt.nominal_power = None
     test_farm = {
         'wind_turbine_fleet': [{
             'wind_turbine': wt,
             'number_of_turbines': 3
         }]
     }
     msg = 'Total capacity of turbines of type'
     with pytest.raises(ValueError, match=msg):
         WindFarm(**test_farm)
 def test_initialization_5(self):
     """test catching error when number of turbines cannot be deduced"""
     wt = WindTurbine(**self.test_turbine)
     wt.nominal_power = None
     test_farm = {
         "wind_turbine_fleet": [{
             "wind_turbine": wt,
             "total_capacity": 3e6
         }]
     }
     msg = "Number of turbines of type"
     with pytest.raises(ValueError, match=msg):
         WindFarm(**test_farm)