Example #1
0
    def test_with_details(self, reset_config):
        Config.set("feps", 'emissions', "model")
        Config.set(True, 'emissions', "include_emissions_details")
        emissions.Feps(fire_failure_manager).run(self.fires)

        assert self.fires[0]['error'] == (
            'Missing fuelbed data required for computing emissions')

        assert 'emissions_details' in self.fires[1]['activity'][0]['fuelbeds'][
            0]
        self._check_emissions(
            self.EXPECTED_FIRE1_EMISSIONS,
            self.fires[1]['activity'][0]['fuelbeds'][0]['emissions'])
Example #2
0
    def test_wo_details_PM_only(self, reset_config):
        Config.set("feps", 'emissions', "model")
        Config.set(False, 'emissions', "include_emissions_details")
        Config.set(['PM2.5', 'PM10'], 'emissions', "species")
        emissions.Feps(fire_failure_manager).run(self.fires)

        assert self.fires[0]['error'] == (
            'Missing fuelbed data required for computing emissions')

        assert 'emissions_details' not in self.fires[1]['activity'][0][
            'fuelbeds'][0]
        self._check_emissions(
            self.EXPECTED_FIRE1_EMISSIONS_PM_ONLY,
            self.fires[1]['activity'][0]['fuelbeds'][0]['emissions'])