def test_set_channel_rtmp_ok(self):
        resp_data = resp_datafile('set_channel_rtmp', 'ok')
        httpretty.register_uri(
                httpretty.POST,
                '%s/admin/channel39/streamsetup' % epiphan_url,
                body=resp_data,
                status=200)

        response = WebUiChannel.set_channel_rtmp(
                client=self.c, channel_id='39',
                rtmp_url='http://fake-fake.akamai.com',
                rtmp_stream='dev-epiphan002-presenter-delivery.stream-1920x540_1_200@355694',
                rtmp_usr='******',
                rtmp_pwd='superfakeuser')
        assert response
    def test_set_channel_rtmp_pwd_didnt_take(self):
        resp_data = resp_datafile('set_channel_rtmp', 'ok')
        httpretty.register_uri(
                httpretty.POST,
                '%s/admin/channel39/streamsetup' % epiphan_url,
                body=resp_data,
                status=200)

        with pytest.raises(SettingConfigError) as e:
                response = WebUiChannel.set_channel_rtmp(
                        client=self.c, channel_id='39',
                        rtmp_url='http://fake-fake.akamai.com',
                        rtmp_stream='dev-epiphan002-presenter-delivery.stream-1920x540_1_200@355694',
                        rtmp_usr='******',
                        rtmp_pwd='ladeeda')
        assert 'not the rtmp_pwd expected' in e.value.message