

@mock_kernel_modules
def test_sensor_type_name(self):
    ds18s20_sensor_id = create_w1_therm_sensor(W1ThermSensor.THERM_SENSOR_DS18S20)
    ds1822_sensor_id = create_w1_therm_sensor(W1ThermSensor.THERM_SENSOR_DS1822)
    ds18b20_sensor_id = create_w1_therm_sensor(W1ThermSensor.THERM_SENSOR_DS18B20)
    sensor = W1ThermSensor(W1ThermSensor.THERM_SENSOR_DS18S20, ds18s20_sensor_id)
    sensor.type_name.should.be.equal('DS18S20')
    sensor = W1ThermSensor(W1ThermSensor.THERM_SENSOR_DS1822, ds1822_sensor_id)
    sensor.type_name.should.be.equal('DS1822')
    sensor = W1ThermSensor(W1ThermSensor.THERM_SENSOR_DS18B20, ds18b20_sensor_id)
    sensor.type_name.should.be.equal('DS18B20')

dataset/ETHPy150Open timofurrer/w1thermsensor/test/test_core.py W1ThermSensorTest.test_sensor_type_name/original