def test_replace_configuration(self): mocked_session = create_mocked_session() client = Azion(session=mocked_session) client.replace_configuration(1, name='My cool configuration', active=False) mocked_session.put.assert_called_once_with( 'https://api.azion.net/content_delivery/configurations/1', json={ 'name': 'My cool configuration', 'active': False })
def test_replace_configuration(self): client = Azion(token) recorder = betamax.Betamax(client.session) with recorder.use_cassette('Configuration_replace'): configuration = client.replace_configuration( 1528252734, name='Dummy configuration', delivery_protocol='http,https') assert isinstance(configuration, Configuration) assert configuration.delivery_protocol == 'http,https'