def test_delete_instance(self, request):
        resp = Mock()
        resp.content = ""
        resp.status_code = 204
        request.return_value = resp

        uri = "{0}/Activities/{1}".format(BASE_URI, ACTIVITY_SID)
        list_resource = Activities(BASE_URI, AUTH)
        activity = Activity(list_resource, ACTIVITY_SID)
        activity.delete()
        request.assert_called_with("DELETE", uri, auth=AUTH,
                                   use_json_extension=False)
    def test_update_instance(self, request):
        resp = create_mock_json('tests/resources/task_router/activities_instance.json')
        resp.status_code = 201
        request.return_value = resp

        uri = "{0}/Activities/{1}".format(BASE_URI, ACTIVITY_SID)
        list_resource = Activities(BASE_URI, AUTH)
        activity = Activity(list_resource, ACTIVITY_SID)
        activity.update(friendly_name='Test Activity', available=True)
        exp_params = {
            'FriendlyName': "Test Activity",
            'Available': "true"
        }

        request.assert_called_with("POST", uri, data=exp_params, auth=AUTH,
                                   use_json_extension=False)