def test_render_no_attrs(self): """Ensure `render` works with no optional attributes specified.""" c = Call('local/18882223333@outgoing') self.assertTrue('Channel: local/18882223333@outgoing' in ''.join(c.render()))
def test_render_valid_retry_time(self): """Ensure `render` works using a valid `retry_time` attribute.""" c = Call('channel', retry_time=1) self.assertTrue('1' in ''.join(c.render()))
def test_render_valid_max_retries(self): """Ensure `render` works using a valid `max_retries` attribute.""" c = Call('channel', max_retries=2) self.assertTrue('2' in ''.join(c.render()))
def test_render_valid_account(self): """Ensure `render` works using a valid `account` attribute.""" c = Call('channel', account='account') self.assertTrue('account' in ''.join(c.render()))
def test_render_valid_wait_time(self): """Ensure `render` works using a valid `wait_time` attribute.""" c = Call('channel', wait_time=0) self.assertTrue('0' in ''.join(c.render()))
def test_render_valid_callerid(self): """Ensure `render` works using a valid `callerid` attribute.""" c = Call('channel', callerid='callerid') self.assertTrue('callerid' in ''.join(c.render()))
def test_render_valid_variables(self): """Ensure `render` works using a valid `variables` attribute.""" c = Call('channel', variables={'a': 'b'}) self.assertTrue('a=b' in ''.join(c.render()))
def test_render_valid_max_retries(self): """Ensure `render` works using a valid `max_retries` attribute.""" c = Call('channel', max_retries=2) ok_('2' in ''.join(c.render()))
def test_render_no_attrs(self): """Ensure `render` works with no optional attributes specified.""" c = Call('local/18882223333@outgoing') ok_('Channel: local/18882223333@outgoing' in ''.join(c.render()))
def test_render_valid_wait_time(self): """Ensure `render` works using a valid `wait_time` attribute.""" c = Call('channel', wait_time=0) ok_('0' in ''.join(c.render()))
def test_render_valid_retry_time(self): """Ensure `render` works using a valid `retry_time` attribute.""" c = Call('channel', retry_time=1) ok_('1' in ''.join(c.render()))
def test_render_valid_account(self): """Ensure `render` works using a valid `account` attribute.""" c = Call('channel', account='account') ok_('account' in ''.join(c.render()))
def test_render_valid_variables(self): """Ensure `render` works using a valid `variables` attribute.""" c = Call('channel', variables={'a': 'b'}) ok_('a=b' in ''.join(c.render()))
def test_render_valid_callerid(self): """Ensure `render` works using a valid `callerid` attribute.""" c = Call('channel', callerid='callerid') ok_('callerid' in ''.join(c.render()))
def test_render_valid_channel(self): """Ensure `render` works using a valid `channel` attribute.""" c = Call('channel') ok_('channel' in ''.join(c.render()))