def test_set_source_deinterlacing_ok(self):
        resp_data = resp_datafile('set_source_deinterlacing', 'ok')
        httpretty.register_uri(
                httpretty.POST,
                '%s/admin/sources/D12345678.hdmi-a' % epiphan_url,
                body=resp_data,
                status=200)

        response = WebUiConfig.set_source_deinterlacing(
                client=self.c, source_name='D12345678.hdmi-a')
        assert response
    def test_set_source_deinterlacing_didnot_take(self):
        resp_data = resp_datafile('set_source_deinterlacing', 'ok')
        httpretty.register_uri(
                httpretty.POST,
                '%s/admin/sources/D12345678.hdmi-a' % epiphan_url,
                body=resp_data,
                status=200)

        with pytest.raises(SettingConfigError) as e:
            response = WebUiConfig.set_source_deinterlacing(
                    client=self.c, source_name='D12345678.hdmi-a',
                    enabled=False)
        assert 'deinterlacing expected to be OFF' in e.value.message