Beispiel #1
0
 def test_partial_update_configuration(self):
     mocked_session = create_mocked_session()
     client = Azion(session=mocked_session)
     client.partial_update_configuration(1,
                                         name='My cool configuration',
                                         active=False)
     mocked_session.patch.assert_called_once_with(
         'https://api.azion.net/content_delivery/configurations/1',
         json={
             'name': 'My cool configuration',
             'active': False
         })
Beispiel #2
0
    def test_update_configuration(self):
        client = Azion(token)
        recorder = betamax.Betamax(client.session)

        with recorder.use_cassette('Configuration_partial_update'):
            configuration = client.partial_update_configuration(
                1528252734, delivery_protocol='http,https')

        assert isinstance(configuration, Configuration)
        assert configuration.delivery_protocol == 'http,https'