'Test the mold indicator internal calculations.'

def test_calculation(self):

    self.assertTrue(setup_component(self.hass, sensor.DOMAIN, {'sensor': {'platform': 'mold_indicator', 'indoor_temp_sensor': 'test.indoortemp', 'outdoor_temp_sensor': 'test.outdoortemp', 'indoor_humidity_sensor': 'test.indoorhumidity', 'calibration_factor': 2.0}}))
    moldind = self.hass.states.get('sensor.mold_indicator')
    assert moldind
    dewpoint = moldind.attributes.get(ATTR_DEWPOINT)
    assert dewpoint
    assert (dewpoint > 9.25)
    assert (dewpoint < 9.26)
    esttemp = moldind.attributes.get(ATTR_CRITICAL_TEMP)
    assert esttemp
    assert (esttemp > 14.9)
    assert (esttemp < 15.1)
    state = moldind.state
    assert state
    assert (state == '68')
