tests/testthat/test-models.R

## Generated by scripts/scrape_process.R -- do not edit

context("models")


test_that("'Annotation' model matches prototype", {
  obj <- Annotation$new(id = "d57dcd6d-860e-46df-9f6c-7cc910e7cff2", plot = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "d57dcd6d-860e-46df-9f6c-7cc910e7cff2",
  "js_callbacks": {},
  "level": "annotation",
  "name": null,
  "plot": null,
  "tags": [],
  "visible": true
}')
})

test_that("'Arrow' model matches prototype", {
  obj <- Arrow$new(id = "6ab41868-2a68-40a6-aeb0-c49579745840", end = list(id = "f6aa99ee-ff85-40ca-927f-970a298cbb65", type = "OpenHead"), source = NA, start = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "end": {
    "id": "f6aa99ee-ff85-40ca-927f-970a298cbb65",
    "type": "OpenHead"
  },
  "end_units": "data",
  "id": "6ab41868-2a68-40a6-aeb0-c49579745840",
  "js_callbacks": {},
  "level": "annotation",
  "line_alpha": {
    "value": 1
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "plot": null,
  "source": null,
  "start": null,
  "start_units": "data",
  "tags": [],
  "visible": true,
  "x_end": null,
  "x_range_name": "default",
  "x_start": null,
  "y_end": null,
  "y_range_name": "default",
  "y_start": null
}')
})

test_that("'BoxAnnotation' model matches prototype", {
  obj <- BoxAnnotation$new(id = "954b87f7-600d-44af-bc9c-314156f2bd54")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "bottom": null,
  "bottom_units": "data",
  "fill_alpha": {
    "value": 0.4
  },
  "fill_color": {
    "value": "#fff9ba"
  },
  "id": "954b87f7-600d-44af-bc9c-314156f2bd54",
  "js_callbacks": {},
  "left": null,
  "left_units": "data",
  "level": "annotation",
  "line_alpha": {
    "value": 0.3
  },
  "line_cap": "butt",
  "line_color": {
    "value": "#cccccc"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "plot": null,
  "render_mode": "canvas",
  "right": null,
  "right_units": "data",
  "tags": [],
  "top": null,
  "top_units": "data",
  "visible": true,
  "x_range_name": "default",
  "y_range_name": "default"
}')
})

test_that("'ColorBar' model matches prototype", {
  obj <- ColorBar$new(id = "36c492c4-15b4-4651-8919-31e6f4d25aad", color_mapper = NA, formatter = list(id = "144d495a-64cd-4d07-9104-fa42d198a706", type = "BasicTickFormatter"), ticker = list(id = "016ce443-cd76-4885-89fe-b332cb52e532", type = "BasicTicker"))
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "background_fill_alpha": {
    "value": 0.95
  },
  "background_fill_color": {
    "value": "#ffffff"
  },
  "bar_line_alpha": {
    "value": 1
  },
  "bar_line_cap": "butt",
  "bar_line_color": {
    "value": null
  },
  "bar_line_dash": [],
  "bar_line_dash_offset": 0,
  "bar_line_join": "miter",
  "bar_line_width": {
    "value": 1
  },
  "border_line_alpha": {
    "value": 1
  },
  "border_line_cap": "butt",
  "border_line_color": {
    "value": null
  },
  "border_line_dash": [],
  "border_line_dash_offset": 0,
  "border_line_join": "miter",
  "border_line_width": {
    "value": 1
  },
  "color_mapper": null,
  "formatter": {
    "id": "144d495a-64cd-4d07-9104-fa42d198a706",
    "type": "BasicTickFormatter"
  },
  "height": "auto",
  "id": "36c492c4-15b4-4651-8919-31e6f4d25aad",
  "js_callbacks": {},
  "label_standoff": 5,
  "level": "annotation",
  "location": "top_right",
  "major_label_text_align": "center",
  "major_label_text_alpha": {
    "value": 1
  },
  "major_label_text_baseline": "middle",
  "major_label_text_color": {
    "value": "#444444"
  },
  "major_label_text_font": "helvetica",
  "major_label_text_font_size": {
    "value": "8pt"
  },
  "major_label_text_font_style": "normal",
  "major_tick_in": 5,
  "major_tick_line_alpha": {
    "value": 1
  },
  "major_tick_line_cap": "butt",
  "major_tick_line_color": {
    "value": "#ffffff"
  },
  "major_tick_line_dash": [],
  "major_tick_line_dash_offset": 0,
  "major_tick_line_join": "miter",
  "major_tick_line_width": {
    "value": 1
  },
  "major_tick_out": 0,
  "margin": 30,
  "minor_tick_in": 0,
  "minor_tick_line_alpha": {
    "value": 1
  },
  "minor_tick_line_cap": "butt",
  "minor_tick_line_color": {
    "value": null
  },
  "minor_tick_line_dash": [],
  "minor_tick_line_dash_offset": 0,
  "minor_tick_line_join": "miter",
  "minor_tick_line_width": {
    "value": 1
  },
  "minor_tick_out": 0,
  "name": null,
  "orientation": "vertical",
  "padding": 10,
  "plot": null,
  "scale_alpha": 1,
  "tags": [],
  "ticker": {
    "id": "016ce443-cd76-4885-89fe-b332cb52e532",
    "type": "BasicTicker"
  },
  "title": null,
  "title_standoff": 2,
  "title_text_align": "left",
  "title_text_alpha": {
    "value": 1
  },
  "title_text_baseline": "bottom",
  "title_text_color": {
    "value": "#444444"
  },
  "title_text_font": "helvetica",
  "title_text_font_size": {
    "value": "10pt"
  },
  "title_text_font_style": "italic",
  "visible": true,
  "width": "auto"
}')
})

test_that("'Label' model matches prototype", {
  obj <- Label$new(id = "258d0e24-3157-4279-bb32-f36b95c0e37a")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "angle": 0,
  "angle_units": "rad",
  "background_fill_alpha": {
    "value": 1
  },
  "background_fill_color": {
    "value": null
  },
  "border_line_alpha": {
    "value": 1
  },
  "border_line_cap": "butt",
  "border_line_color": {
    "value": null
  },
  "border_line_dash": [],
  "border_line_dash_offset": 0,
  "border_line_join": "miter",
  "border_line_width": {
    "value": 1
  },
  "id": "258d0e24-3157-4279-bb32-f36b95c0e37a",
  "js_callbacks": {},
  "level": "annotation",
  "name": null,
  "plot": null,
  "render_mode": "canvas",
  "tags": [],
  "text": null,
  "text_align": "left",
  "text_alpha": {
    "value": 1
  },
  "text_baseline": "bottom",
  "text_color": {
    "value": "#444444"
  },
  "text_font": "helvetica",
  "text_font_size": {
    "value": "12pt"
  },
  "text_font_style": "normal",
  "visible": true,
  "x": null,
  "x_offset": 0,
  "x_range_name": "default",
  "x_units": "data",
  "y": null,
  "y_offset": 0,
  "y_range_name": "default",
  "y_units": "data"
}')
})

test_that("'LabelSet' model matches prototype", {
  obj <- LabelSet$new(id = "d4ae48e4-bb1f-47d3-abca-5a60436402ec", source = list(id = "bc6bf2a9-6a64-4569-927b-3b64fc9e6705", type = "ColumnDataSource"))
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "angle": {
    "units": "rad",
    "value": 0
  },
  "background_fill_alpha": {
    "value": 1
  },
  "background_fill_color": {
    "value": null
  },
  "border_line_alpha": {
    "value": 1
  },
  "border_line_cap": "butt",
  "border_line_color": {
    "value": null
  },
  "border_line_dash": [],
  "border_line_dash_offset": 0,
  "border_line_join": "miter",
  "border_line_width": {
    "value": 1
  },
  "id": "d4ae48e4-bb1f-47d3-abca-5a60436402ec",
  "js_callbacks": {},
  "level": "annotation",
  "name": null,
  "plot": null,
  "render_mode": "canvas",
  "source": {
    "id": "bc6bf2a9-6a64-4569-927b-3b64fc9e6705",
    "type": "ColumnDataSource"
  },
  "tags": [],
  "text": {
    "field": "text"
  },
  "text_align": "left",
  "text_alpha": {
    "value": 1
  },
  "text_baseline": "bottom",
  "text_color": {
    "value": "#444444"
  },
  "text_font": "helvetica",
  "text_font_size": {
    "value": "12pt"
  },
  "text_font_style": "normal",
  "visible": true,
  "x": null,
  "x_offset": {
    "value": 0
  },
  "x_range_name": "default",
  "x_units": "data",
  "y": null,
  "y_offset": {
    "value": 0
  },
  "y_range_name": "default",
  "y_units": "data"
}')
})

test_that("'Legend' model matches prototype", {
  obj <- Legend$new(id = "e6a4c7a8-93bb-4b34-9a76-023b069b2899")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "background_fill_alpha": {
    "value": 0.95
  },
  "background_fill_color": {
    "value": "#ffffff"
  },
  "border_line_alpha": {
    "value": 0.5
  },
  "border_line_cap": "butt",
  "border_line_color": {
    "value": "#e5e5e5"
  },
  "border_line_dash": [],
  "border_line_dash_offset": 0,
  "border_line_join": "miter",
  "border_line_width": {
    "value": 1
  },
  "glyph_height": 20,
  "glyph_width": 20,
  "id": "e6a4c7a8-93bb-4b34-9a76-023b069b2899",
  "items": [],
  "js_callbacks": {},
  "label_height": 20,
  "label_standoff": 5,
  "label_text_align": "left",
  "label_text_alpha": {
    "value": 1
  },
  "label_text_baseline": "middle",
  "label_text_color": {
    "value": "#444444"
  },
  "label_text_font": "helvetica",
  "label_text_font_size": {
    "value": "10pt"
  },
  "label_text_font_style": "normal",
  "label_width": 20,
  "level": "annotation",
  "location": "top_right",
  "margin": 10,
  "name": null,
  "orientation": "vertical",
  "padding": 10,
  "plot": null,
  "spacing": 3,
  "tags": [],
  "visible": true
}')
})

test_that("'LegendItem' model matches prototype", {
  obj <- LegendItem$new(id = "1c353c5b-3bb5-4cb9-b7cb-6c9c7b6d8a2d")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "1c353c5b-3bb5-4cb9-b7cb-6c9c7b6d8a2d",
  "js_callbacks": {},
  "label": null,
  "name": null,
  "renderers": [],
  "tags": []
}')
})

test_that("'PolyAnnotation' model matches prototype", {
  obj <- PolyAnnotation$new(id = "e7fd938a-a43a-443f-aa06-8259e92de8b5")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "fill_alpha": {
    "value": 0.4
  },
  "fill_color": {
    "value": "#fff9ba"
  },
  "id": "e7fd938a-a43a-443f-aa06-8259e92de8b5",
  "js_callbacks": {},
  "level": "annotation",
  "line_alpha": {
    "value": 0.3
  },
  "line_cap": "butt",
  "line_color": {
    "value": "#cccccc"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "plot": null,
  "tags": [],
  "visible": true,
  "x_range_name": "default",
  "xs": [],
  "xs_units": "data",
  "y_range_name": "default",
  "ys": [],
  "ys_units": "data"
}')
})

test_that("'Span' model matches prototype", {
  obj <- Span$new(id = "3beaf01a-7b1a-43c1-99af-03ea0169794c")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "dimension": "width",
  "id": "3beaf01a-7b1a-43c1-99af-03ea0169794c",
  "js_callbacks": {},
  "level": "annotation",
  "line_alpha": {
    "value": 1
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "location": null,
  "location_units": "data",
  "name": null,
  "plot": null,
  "render_mode": "canvas",
  "tags": [],
  "visible": true,
  "x_range_name": "default",
  "y_range_name": "default"
}')
})

test_that("'TextAnnotation' model matches prototype", {
  obj <- TextAnnotation$new(id = "806cb479-4e7a-4974-b5af-64794c654a88")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "806cb479-4e7a-4974-b5af-64794c654a88",
  "js_callbacks": {},
  "level": "annotation",
  "name": null,
  "plot": null,
  "tags": [],
  "visible": true
}')
})

test_that("'Title' model matches prototype", {
  obj <- Title$new(id = "4321cfb0-0f40-47c7-b2f3-b4e7970f96af")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "align": "left",
  "background_fill_alpha": {
    "value": 1
  },
  "background_fill_color": {
    "value": null
  },
  "border_line_alpha": {
    "value": 1
  },
  "border_line_cap": "butt",
  "border_line_color": {
    "value": null
  },
  "border_line_dash": [],
  "border_line_dash_offset": 0,
  "border_line_join": "miter",
  "border_line_width": {
    "value": 1
  },
  "id": "4321cfb0-0f40-47c7-b2f3-b4e7970f96af",
  "js_callbacks": {},
  "level": "annotation",
  "name": null,
  "offset": 0,
  "plot": null,
  "render_mode": "canvas",
  "tags": [],
  "text": null,
  "text_alpha": {
    "value": 1
  },
  "text_color": {
    "value": "#444444"
  },
  "text_font": "helvetica",
  "text_font_size": {
    "value": "10pt"
  },
  "text_font_style": "bold",
  "visible": true
}')
})

test_that("'Tooltip' model matches prototype", {
  obj <- Tooltip$new(id = "347c0e57-00a3-4ee5-8070-908a7c0ee2c8")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "attachment": "horizontal",
  "id": "347c0e57-00a3-4ee5-8070-908a7c0ee2c8",
  "inner_only": true,
  "js_callbacks": {},
  "level": "overlay",
  "name": null,
  "plot": null,
  "show_arrow": true,
  "tags": [],
  "visible": true
}')
})

test_that("'ArrowHead' model matches prototype", {
  obj <- ArrowHead$new(id = "74165e32-ee85-45bf-b55d-3c472b665cce")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "74165e32-ee85-45bf-b55d-3c472b665cce",
  "js_callbacks": {},
  "level": "annotation",
  "name": null,
  "plot": null,
  "tags": [],
  "visible": true
}')
})

test_that("'NormalHead' model matches prototype", {
  obj <- NormalHead$new(id = "e132c1d6-8487-4426-ab74-cc8387cf6c77")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "fill_alpha": {
    "value": 1
  },
  "fill_color": {
    "value": "black"
  },
  "id": "e132c1d6-8487-4426-ab74-cc8387cf6c77",
  "js_callbacks": {},
  "level": "annotation",
  "line_alpha": {
    "value": 1
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "plot": null,
  "size": 25,
  "tags": [],
  "visible": true
}')
})

test_that("'OpenHead' model matches prototype", {
  obj <- OpenHead$new(id = "0776f288-fb06-4541-b571-739774357902")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "0776f288-fb06-4541-b571-739774357902",
  "js_callbacks": {},
  "level": "annotation",
  "line_alpha": {
    "value": 1
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "plot": null,
  "size": 25,
  "tags": [],
  "visible": true
}')
})

test_that("'VeeHead' model matches prototype", {
  obj <- VeeHead$new(id = "26cc90ce-fb63-461c-9016-9e195f6a4965")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "fill_alpha": {
    "value": 1
  },
  "fill_color": {
    "value": "black"
  },
  "id": "26cc90ce-fb63-461c-9016-9e195f6a4965",
  "js_callbacks": {},
  "level": "annotation",
  "line_alpha": {
    "value": 1
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "plot": null,
  "size": 25,
  "tags": [],
  "visible": true
}')
})

test_that("'Axis' model matches prototype", {
  obj <- Axis$new(id = "cb15dc54-b46b-48be-829b-f6945ceadad9", formatter = NA, ticker = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "axis_label": "",
  "axis_label_standoff": 5,
  "axis_label_text_align": "left",
  "axis_label_text_alpha": {
    "value": 1
  },
  "axis_label_text_baseline": "bottom",
  "axis_label_text_color": {
    "value": "#444444"
  },
  "axis_label_text_font": "helvetica",
  "axis_label_text_font_size": {
    "value": "10pt"
  },
  "axis_label_text_font_style": "italic",
  "axis_line_alpha": {
    "value": 1
  },
  "axis_line_cap": "butt",
  "axis_line_color": {
    "value": "black"
  },
  "axis_line_dash": [],
  "axis_line_dash_offset": 0,
  "axis_line_join": "miter",
  "axis_line_width": {
    "value": 1
  },
  "bounds": "auto",
  "formatter": null,
  "id": "cb15dc54-b46b-48be-829b-f6945ceadad9",
  "js_callbacks": {},
  "level": "overlay",
  "major_label_orientation": "horizontal",
  "major_label_standoff": 5,
  "major_label_text_align": "center",
  "major_label_text_alpha": {
    "value": 1
  },
  "major_label_text_baseline": "alphabetic",
  "major_label_text_color": {
    "value": "#444444"
  },
  "major_label_text_font": "helvetica",
  "major_label_text_font_size": {
    "value": "8pt"
  },
  "major_label_text_font_style": "normal",
  "major_tick_in": 2,
  "major_tick_line_alpha": {
    "value": 1
  },
  "major_tick_line_cap": "butt",
  "major_tick_line_color": {
    "value": "black"
  },
  "major_tick_line_dash": [],
  "major_tick_line_dash_offset": 0,
  "major_tick_line_join": "miter",
  "major_tick_line_width": {
    "value": 1
  },
  "major_tick_out": 6,
  "minor_tick_in": 0,
  "minor_tick_line_alpha": {
    "value": 1
  },
  "minor_tick_line_cap": "butt",
  "minor_tick_line_color": {
    "value": "black"
  },
  "minor_tick_line_dash": [],
  "minor_tick_line_dash_offset": 0,
  "minor_tick_line_join": "miter",
  "minor_tick_line_width": {
    "value": 1
  },
  "minor_tick_out": 4,
  "name": null,
  "plot": null,
  "tags": [],
  "ticker": null,
  "visible": true,
  "x_range_name": "default",
  "y_range_name": "default"
}')
})

test_that("'CategoricalAxis' model matches prototype", {
  obj <- CategoricalAxis$new(id = "ab1e4916-e136-4c75-8a1b-1c8c316af06d")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "axis_label": "",
  "axis_label_standoff": 5,
  "axis_label_text_align": "left",
  "axis_label_text_alpha": {
    "value": 1
  },
  "axis_label_text_baseline": "bottom",
  "axis_label_text_color": {
    "value": "#444444"
  },
  "axis_label_text_font": "helvetica",
  "axis_label_text_font_size": {
    "value": "10pt"
  },
  "axis_label_text_font_style": "italic",
  "axis_line_alpha": {
    "value": 1
  },
  "axis_line_cap": "butt",
  "axis_line_color": {
    "value": "black"
  },
  "axis_line_dash": [],
  "axis_line_dash_offset": 0,
  "axis_line_join": "miter",
  "axis_line_width": {
    "value": 1
  },
  "bounds": "auto",
  "formatter": {
    "id": "5b0e6059-3bdf-494a-a1cf-cbf8a507c4ad",
    "type": "CategoricalTickFormatter"
  },
  "id": "ab1e4916-e136-4c75-8a1b-1c8c316af06d",
  "js_callbacks": {},
  "level": "overlay",
  "major_label_orientation": "horizontal",
  "major_label_standoff": 5,
  "major_label_text_align": "center",
  "major_label_text_alpha": {
    "value": 1
  },
  "major_label_text_baseline": "alphabetic",
  "major_label_text_color": {
    "value": "#444444"
  },
  "major_label_text_font": "helvetica",
  "major_label_text_font_size": {
    "value": "8pt"
  },
  "major_label_text_font_style": "normal",
  "major_tick_in": 2,
  "major_tick_line_alpha": {
    "value": 1
  },
  "major_tick_line_cap": "butt",
  "major_tick_line_color": {
    "value": "black"
  },
  "major_tick_line_dash": [],
  "major_tick_line_dash_offset": 0,
  "major_tick_line_join": "miter",
  "major_tick_line_width": {
    "value": 1
  },
  "major_tick_out": 6,
  "minor_tick_in": 0,
  "minor_tick_line_alpha": {
    "value": 1
  },
  "minor_tick_line_cap": "butt",
  "minor_tick_line_color": {
    "value": "black"
  },
  "minor_tick_line_dash": [],
  "minor_tick_line_dash_offset": 0,
  "minor_tick_line_join": "miter",
  "minor_tick_line_width": {
    "value": 1
  },
  "minor_tick_out": 4,
  "name": null,
  "plot": null,
  "tags": [],
  "ticker": {
    "id": "5d657499-ccee-4761-8e15-22073621454e",
    "type": "CategoricalTicker"
  },
  "visible": true,
  "x_range_name": "default",
  "y_range_name": "default"
}')
})

test_that("'ContinuousAxis' model matches prototype", {
  obj <- ContinuousAxis$new(id = "617597a2-c366-4ace-9e74-fd486eb730c8")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "axis_label": "",
  "axis_label_standoff": 5,
  "axis_label_text_align": "left",
  "axis_label_text_alpha": {
    "value": 1
  },
  "axis_label_text_baseline": "bottom",
  "axis_label_text_color": {
    "value": "#444444"
  },
  "axis_label_text_font": "helvetica",
  "axis_label_text_font_size": {
    "value": "10pt"
  },
  "axis_label_text_font_style": "italic",
  "axis_line_alpha": {
    "value": 1
  },
  "axis_line_cap": "butt",
  "axis_line_color": {
    "value": "black"
  },
  "axis_line_dash": [],
  "axis_line_dash_offset": 0,
  "axis_line_join": "miter",
  "axis_line_width": {
    "value": 1
  },
  "bounds": "auto",
  "formatter": null,
  "id": "617597a2-c366-4ace-9e74-fd486eb730c8",
  "js_callbacks": {},
  "level": "overlay",
  "major_label_orientation": "horizontal",
  "major_label_standoff": 5,
  "major_label_text_align": "center",
  "major_label_text_alpha": {
    "value": 1
  },
  "major_label_text_baseline": "alphabetic",
  "major_label_text_color": {
    "value": "#444444"
  },
  "major_label_text_font": "helvetica",
  "major_label_text_font_size": {
    "value": "8pt"
  },
  "major_label_text_font_style": "normal",
  "major_tick_in": 2,
  "major_tick_line_alpha": {
    "value": 1
  },
  "major_tick_line_cap": "butt",
  "major_tick_line_color": {
    "value": "black"
  },
  "major_tick_line_dash": [],
  "major_tick_line_dash_offset": 0,
  "major_tick_line_join": "miter",
  "major_tick_line_width": {
    "value": 1
  },
  "major_tick_out": 6,
  "minor_tick_in": 0,
  "minor_tick_line_alpha": {
    "value": 1
  },
  "minor_tick_line_cap": "butt",
  "minor_tick_line_color": {
    "value": "black"
  },
  "minor_tick_line_dash": [],
  "minor_tick_line_dash_offset": 0,
  "minor_tick_line_join": "miter",
  "minor_tick_line_width": {
    "value": 1
  },
  "minor_tick_out": 4,
  "name": null,
  "plot": null,
  "tags": [],
  "ticker": null,
  "visible": true,
  "x_range_name": "default",
  "y_range_name": "default"
}')
})

test_that("'DatetimeAxis' model matches prototype", {
  obj <- DatetimeAxis$new(id = "a867578c-7f24-40fe-938c-4ba949a4a3c1")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "axis_label": "",
  "axis_label_standoff": 5,
  "axis_label_text_align": "left",
  "axis_label_text_alpha": {
    "value": 1
  },
  "axis_label_text_baseline": "bottom",
  "axis_label_text_color": {
    "value": "#444444"
  },
  "axis_label_text_font": "helvetica",
  "axis_label_text_font_size": {
    "value": "10pt"
  },
  "axis_label_text_font_style": "italic",
  "axis_line_alpha": {
    "value": 1
  },
  "axis_line_cap": "butt",
  "axis_line_color": {
    "value": "black"
  },
  "axis_line_dash": [],
  "axis_line_dash_offset": 0,
  "axis_line_join": "miter",
  "axis_line_width": {
    "value": 1
  },
  "bounds": "auto",
  "formatter": {
    "id": "6e3bb00d-5f1f-4083-a860-b024c5c85d02",
    "type": "DatetimeTickFormatter"
  },
  "id": "a867578c-7f24-40fe-938c-4ba949a4a3c1",
  "js_callbacks": {},
  "level": "overlay",
  "major_label_orientation": "horizontal",
  "major_label_standoff": 5,
  "major_label_text_align": "center",
  "major_label_text_alpha": {
    "value": 1
  },
  "major_label_text_baseline": "alphabetic",
  "major_label_text_color": {
    "value": "#444444"
  },
  "major_label_text_font": "helvetica",
  "major_label_text_font_size": {
    "value": "8pt"
  },
  "major_label_text_font_style": "normal",
  "major_tick_in": 2,
  "major_tick_line_alpha": {
    "value": 1
  },
  "major_tick_line_cap": "butt",
  "major_tick_line_color": {
    "value": "black"
  },
  "major_tick_line_dash": [],
  "major_tick_line_dash_offset": 0,
  "major_tick_line_join": "miter",
  "major_tick_line_width": {
    "value": 1
  },
  "major_tick_out": 6,
  "minor_tick_in": 0,
  "minor_tick_line_alpha": {
    "value": 1
  },
  "minor_tick_line_cap": "butt",
  "minor_tick_line_color": {
    "value": "black"
  },
  "minor_tick_line_dash": [],
  "minor_tick_line_dash_offset": 0,
  "minor_tick_line_join": "miter",
  "minor_tick_line_width": {
    "value": 1
  },
  "minor_tick_out": 4,
  "name": null,
  "plot": null,
  "tags": [],
  "ticker": {
    "id": "95baf748-d221-43a5-84ab-5cffb5fc3e13",
    "type": "DatetimeTicker"
  },
  "visible": true,
  "x_range_name": "default",
  "y_range_name": "default"
}')
})

test_that("'LinearAxis' model matches prototype", {
  obj <- LinearAxis$new(id = "fbe747d6-d99e-457b-a09e-f7dc7391a3c9")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "axis_label": "",
  "axis_label_standoff": 5,
  "axis_label_text_align": "left",
  "axis_label_text_alpha": {
    "value": 1
  },
  "axis_label_text_baseline": "bottom",
  "axis_label_text_color": {
    "value": "#444444"
  },
  "axis_label_text_font": "helvetica",
  "axis_label_text_font_size": {
    "value": "10pt"
  },
  "axis_label_text_font_style": "italic",
  "axis_line_alpha": {
    "value": 1
  },
  "axis_line_cap": "butt",
  "axis_line_color": {
    "value": "black"
  },
  "axis_line_dash": [],
  "axis_line_dash_offset": 0,
  "axis_line_join": "miter",
  "axis_line_width": {
    "value": 1
  },
  "bounds": "auto",
  "formatter": {
    "id": "51d6fa5b-611b-48ea-822f-e480b3f8527d",
    "type": "BasicTickFormatter"
  },
  "id": "fbe747d6-d99e-457b-a09e-f7dc7391a3c9",
  "js_callbacks": {},
  "level": "overlay",
  "major_label_orientation": "horizontal",
  "major_label_standoff": 5,
  "major_label_text_align": "center",
  "major_label_text_alpha": {
    "value": 1
  },
  "major_label_text_baseline": "alphabetic",
  "major_label_text_color": {
    "value": "#444444"
  },
  "major_label_text_font": "helvetica",
  "major_label_text_font_size": {
    "value": "8pt"
  },
  "major_label_text_font_style": "normal",
  "major_tick_in": 2,
  "major_tick_line_alpha": {
    "value": 1
  },
  "major_tick_line_cap": "butt",
  "major_tick_line_color": {
    "value": "black"
  },
  "major_tick_line_dash": [],
  "major_tick_line_dash_offset": 0,
  "major_tick_line_join": "miter",
  "major_tick_line_width": {
    "value": 1
  },
  "major_tick_out": 6,
  "minor_tick_in": 0,
  "minor_tick_line_alpha": {
    "value": 1
  },
  "minor_tick_line_cap": "butt",
  "minor_tick_line_color": {
    "value": "black"
  },
  "minor_tick_line_dash": [],
  "minor_tick_line_dash_offset": 0,
  "minor_tick_line_join": "miter",
  "minor_tick_line_width": {
    "value": 1
  },
  "minor_tick_out": 4,
  "name": null,
  "plot": null,
  "tags": [],
  "ticker": {
    "id": "34502a90-fd25-41df-9bfd-35a2dffe8d36",
    "type": "BasicTicker"
  },
  "visible": true,
  "x_range_name": "default",
  "y_range_name": "default"
}')
})

test_that("'LogAxis' model matches prototype", {
  obj <- LogAxis$new(id = "6ef7d192-502c-4489-be64-af9eaa501849")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "axis_label": "",
  "axis_label_standoff": 5,
  "axis_label_text_align": "left",
  "axis_label_text_alpha": {
    "value": 1
  },
  "axis_label_text_baseline": "bottom",
  "axis_label_text_color": {
    "value": "#444444"
  },
  "axis_label_text_font": "helvetica",
  "axis_label_text_font_size": {
    "value": "10pt"
  },
  "axis_label_text_font_style": "italic",
  "axis_line_alpha": {
    "value": 1
  },
  "axis_line_cap": "butt",
  "axis_line_color": {
    "value": "black"
  },
  "axis_line_dash": [],
  "axis_line_dash_offset": 0,
  "axis_line_join": "miter",
  "axis_line_width": {
    "value": 1
  },
  "bounds": "auto",
  "formatter": {
    "id": "f88a34d8-bd3e-4e52-a583-62af68df1c60",
    "type": "LogTickFormatter"
  },
  "id": "6ef7d192-502c-4489-be64-af9eaa501849",
  "js_callbacks": {},
  "level": "overlay",
  "major_label_orientation": "horizontal",
  "major_label_standoff": 5,
  "major_label_text_align": "center",
  "major_label_text_alpha": {
    "value": 1
  },
  "major_label_text_baseline": "alphabetic",
  "major_label_text_color": {
    "value": "#444444"
  },
  "major_label_text_font": "helvetica",
  "major_label_text_font_size": {
    "value": "8pt"
  },
  "major_label_text_font_style": "normal",
  "major_tick_in": 2,
  "major_tick_line_alpha": {
    "value": 1
  },
  "major_tick_line_cap": "butt",
  "major_tick_line_color": {
    "value": "black"
  },
  "major_tick_line_dash": [],
  "major_tick_line_dash_offset": 0,
  "major_tick_line_join": "miter",
  "major_tick_line_width": {
    "value": 1
  },
  "major_tick_out": 6,
  "minor_tick_in": 0,
  "minor_tick_line_alpha": {
    "value": 1
  },
  "minor_tick_line_cap": "butt",
  "minor_tick_line_color": {
    "value": "black"
  },
  "minor_tick_line_dash": [],
  "minor_tick_line_dash_offset": 0,
  "minor_tick_line_join": "miter",
  "minor_tick_line_width": {
    "value": 1
  },
  "minor_tick_out": 4,
  "name": null,
  "plot": null,
  "tags": [],
  "ticker": {
    "id": "0931e78b-b5d8-4d0c-af6c-6407d81f66d8",
    "type": "LogTicker"
  },
  "visible": true,
  "x_range_name": "default",
  "y_range_name": "default"
}')
})

test_that("'Callback' model matches prototype", {
  obj <- Callback$new(id = "f0157d7d-091a-4bf3-925a-d61af0f5bff4")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "f0157d7d-091a-4bf3-925a-d61af0f5bff4",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'CustomJS' model matches prototype", {
  obj <- CustomJS$new(id = "47c11088-9428-40df-801e-b6b09436894e")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "args": {},
  "code": "",
  "id": "47c11088-9428-40df-801e-b6b09436894e",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'OpenURL' model matches prototype", {
  obj <- OpenURL$new(id = "a121f852-fba2-404b-af57-d0079e10544c")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "a121f852-fba2-404b-af57-d0079e10544c",
  "js_callbacks": {},
  "name": null,
  "tags": [],
  "url": "http://"
}')
})

test_that("'BasicTickFormatter' model matches prototype", {
  obj <- BasicTickFormatter$new(id = "7fee40a0-3f33-4222-b799-d7d2690f1f8b")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "7fee40a0-3f33-4222-b799-d7d2690f1f8b",
  "js_callbacks": {},
  "name": null,
  "power_limit_high": 5,
  "power_limit_low": -3,
  "precision": "auto",
  "tags": [],
  "use_scientific": true
}')
})

test_that("'CategoricalTickFormatter' model matches prototype", {
  obj <- CategoricalTickFormatter$new(id = "72f8ba24-3488-465c-b816-f1b707ba5d24")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "72f8ba24-3488-465c-b816-f1b707ba5d24",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'DatetimeTickFormatter' model matches prototype", {
  obj <- DatetimeTickFormatter$new(id = "350f9ad7-3f5a-4f69-b2b2-b3cd0f067bda")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "days": [
    "%m/%d",
    "%a%d"
  ],
  "hourmin": [
    "%H:%M"
  ],
  "hours": [
    "%Hh",
    "%H:%M"
  ],
  "id": "350f9ad7-3f5a-4f69-b2b2-b3cd0f067bda",
  "js_callbacks": {},
  "microseconds": [
    "%fus"
  ],
  "milliseconds": [
    "%3Nms",
    "%S.%3Ns"
  ],
  "minsec": [
    ":%M:%S"
  ],
  "minutes": [
    ":%M",
    "%Mm"
  ],
  "months": [
    "%m/%Y",
    "%b%y"
  ],
  "name": null,
  "seconds": [
    "%Ss"
  ],
  "tags": [],
  "years": [
    "%Y"
  ]
}')
})

test_that("'FuncTickFormatter' model matches prototype", {
  obj <- FuncTickFormatter$new(id = "162bd24c-19d4-4c95-a337-26fe37264a70")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "args": {},
  "code": "",
  "id": "162bd24c-19d4-4c95-a337-26fe37264a70",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'LogTickFormatter' model matches prototype", {
  obj <- LogTickFormatter$new(id = "da54ffc9-5789-4805-a9d7-cf3cbb1fc126", ticker = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "da54ffc9-5789-4805-a9d7-cf3cbb1fc126",
  "js_callbacks": {},
  "name": null,
  "tags": [],
  "ticker": null
}')
})

test_that("'NumeralTickFormatter' model matches prototype", {
  obj <- NumeralTickFormatter$new(id = "0310fd04-4eff-4a31-bc51-2a9b87534e9b")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "format": "0,0",
  "id": "0310fd04-4eff-4a31-bc51-2a9b87534e9b",
  "js_callbacks": {},
  "language": "en",
  "name": null,
  "rounding": "round",
  "tags": []
}')
})

test_that("'PrintfTickFormatter' model matches prototype", {
  obj <- PrintfTickFormatter$new(id = "9d8aeec6-35a0-49ee-94c5-09df1701db87")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "format": "%s",
  "id": "9d8aeec6-35a0-49ee-94c5-09df1701db87",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'TickFormatter' model matches prototype", {
  obj <- TickFormatter$new(id = "6d53d7f7-f1ad-4da1-9ddd-5a25cca1ac77")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "6d53d7f7-f1ad-4da1-9ddd-5a25cca1ac77",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'Grid' model matches prototype", {
  obj <- Grid$new(id = "f2f96c83-2f26-479f-b3c3-5d6b8e6c0066", ticker = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "band_fill_alpha": {
    "value": 0
  },
  "band_fill_color": {
    "value": null
  },
  "bounds": "auto",
  "dimension": 0,
  "grid_line_alpha": {
    "value": 1
  },
  "grid_line_cap": "butt",
  "grid_line_color": {
    "value": "#e5e5e5"
  },
  "grid_line_dash": [],
  "grid_line_dash_offset": 0,
  "grid_line_join": "miter",
  "grid_line_width": {
    "value": 1
  },
  "id": "f2f96c83-2f26-479f-b3c3-5d6b8e6c0066",
  "js_callbacks": {},
  "level": "underlay",
  "minor_grid_line_alpha": {
    "value": 1
  },
  "minor_grid_line_cap": "butt",
  "minor_grid_line_color": {
    "value": null
  },
  "minor_grid_line_dash": [],
  "minor_grid_line_dash_offset": 0,
  "minor_grid_line_join": "miter",
  "minor_grid_line_width": {
    "value": 1
  },
  "name": null,
  "plot": null,
  "tags": [],
  "ticker": null,
  "visible": true,
  "x_range_name": "default",
  "y_range_name": "default"
}')
})

test_that("'ImageSource' model matches prototype", {
  obj <- ImageSource$new(id = "2cc4be76-fe50-449c-9bb2-14488f01e265")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "extra_url_vars": {},
  "id": "2cc4be76-fe50-449c-9bb2-14488f01e265",
  "js_callbacks": {},
  "name": null,
  "tags": [],
  "url": ""
}')
})

test_that("'Box' model matches prototype", {
  obj <- Box$new(id = "5540bb07-1b72-4f87-9543-1af7a97f2635")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "children": [],
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "5540bb07-1b72-4f87-9543-1af7a97f2635",
  "js_callbacks": {},
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "width": null
}')
})

test_that("'Column' model matches prototype", {
  obj <- Column$new(id = "4fbb82ca-69b4-4d5f-a959-8c96b909e0f0")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "children": [],
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "4fbb82ca-69b4-4d5f-a959-8c96b909e0f0",
  "js_callbacks": {},
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "width": null
}')
})

test_that("'LayoutDOM' model matches prototype", {
  obj <- LayoutDOM$new(id = "373908d6-3b02-4dfd-a5e6-1e84d8a927fa")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "373908d6-3b02-4dfd-a5e6-1e84d8a927fa",
  "js_callbacks": {},
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "width": null
}')
})

test_that("'Row' model matches prototype", {
  obj <- Row$new(id = "8c606d43-cdd6-4d50-97bf-68cd6872a98c")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "children": [],
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "8c606d43-cdd6-4d50-97bf-68cd6872a98c",
  "js_callbacks": {},
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "width": null
}')
})

test_that("'Spacer' model matches prototype", {
  obj <- Spacer$new(id = "b3fa1f6c-e042-4dde-ac34-e4512e52133e")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "b3fa1f6c-e042-4dde-ac34-e4512e52133e",
  "js_callbacks": {},
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "width": null
}')
})

test_that("'WidgetBox' model matches prototype", {
  obj <- WidgetBox$new(id = "226037a0-0a49-4a08-9e72-94c2c17831e2")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "children": [],
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "226037a0-0a49-4a08-9e72-94c2c17831e2",
  "js_callbacks": {},
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "width": null
}')
})

test_that("'GMapPlot' model matches prototype", {
  obj <- GMapPlot$new(id = "31ce958b-d46f-45f5-bff0-f7733b96c068", map_options = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "above": [],
  "api_key": null,
  "background_fill_alpha": {
    "value": 1
  },
  "background_fill_color": {
    "value": "#ffffff"
  },
  "below": [],
  "border_fill_alpha": {
    "value": 1
  },
  "border_fill_color": {
    "value": "#ffffff"
  },
  "css_classes": null,
  "disabled": false,
  "extra_x_ranges": {},
  "extra_y_ranges": {},
  "h_symmetry": true,
  "height": null,
  "hidpi": true,
  "id": "31ce958b-d46f-45f5-bff0-f7733b96c068",
  "js_callbacks": {},
  "left": [],
  "lod_factor": 10,
  "lod_interval": 300,
  "lod_threshold": 2000,
  "lod_timeout": 500,
  "map_options": null,
  "min_border": 5,
  "min_border_bottom": null,
  "min_border_left": null,
  "min_border_right": null,
  "min_border_top": null,
  "name": null,
  "outline_line_alpha": {
    "value": 1
  },
  "outline_line_cap": "butt",
  "outline_line_color": {
    "value": "#e5e5e5"
  },
  "outline_line_dash": [],
  "outline_line_dash_offset": 0,
  "outline_line_join": "miter",
  "outline_line_width": {
    "value": 1
  },
  "plot_height": 600,
  "plot_width": 600,
  "renderers": [],
  "right": [],
  "sizing_mode": "fixed",
  "tags": [],
  "title": {
    "id": "0ad75306-01df-464e-8834-7d8715bbc921",
    "type": "Title"
  },
  "title_location": "above",
  "tool_events": {
    "id": "5e0784cc-c554-4704-82ea-aad9e88e443f",
    "type": "ToolEvents"
  },
  "toolbar": {
    "id": "2e328aad-0710-4476-9e54-3b9534c72578",
    "type": "Toolbar"
  },
  "toolbar_location": "right",
  "toolbar_sticky": true,
  "v_symmetry": false,
  "webgl": false,
  "width": null,
  "x_mapper_type": "auto",
  "x_range": null,
  "y_mapper_type": "auto",
  "y_range": null
}')
})

test_that("'MapPlot' model matches prototype", {
  obj <- MapPlot$new(id = "9f944fe3-d6c5-4de0-909c-94fc3707344b")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "above": [],
  "background_fill_alpha": {
    "value": 1
  },
  "background_fill_color": {
    "value": "#ffffff"
  },
  "below": [],
  "border_fill_alpha": {
    "value": 1
  },
  "border_fill_color": {
    "value": "#ffffff"
  },
  "css_classes": null,
  "disabled": false,
  "extra_x_ranges": {},
  "extra_y_ranges": {},
  "h_symmetry": true,
  "height": null,
  "hidpi": true,
  "id": "9f944fe3-d6c5-4de0-909c-94fc3707344b",
  "js_callbacks": {},
  "left": [],
  "lod_factor": 10,
  "lod_interval": 300,
  "lod_threshold": 2000,
  "lod_timeout": 500,
  "min_border": 5,
  "min_border_bottom": null,
  "min_border_left": null,
  "min_border_right": null,
  "min_border_top": null,
  "name": null,
  "outline_line_alpha": {
    "value": 1
  },
  "outline_line_cap": "butt",
  "outline_line_color": {
    "value": "#e5e5e5"
  },
  "outline_line_dash": [],
  "outline_line_dash_offset": 0,
  "outline_line_join": "miter",
  "outline_line_width": {
    "value": 1
  },
  "plot_height": 600,
  "plot_width": 600,
  "renderers": [],
  "right": [],
  "sizing_mode": "fixed",
  "tags": [],
  "title": {
    "id": "985d4472-142e-45a8-89cd-9725d2d152ca",
    "type": "Title"
  },
  "title_location": "above",
  "tool_events": {
    "id": "25fba919-7e74-461e-814d-40d3b635642e",
    "type": "ToolEvents"
  },
  "toolbar": {
    "id": "458aa4b7-353f-478c-9666-a0975247ea56",
    "type": "Toolbar"
  },
  "toolbar_location": "right",
  "toolbar_sticky": true,
  "v_symmetry": false,
  "webgl": false,
  "width": null,
  "x_mapper_type": "auto",
  "x_range": null,
  "y_mapper_type": "auto",
  "y_range": null
}')
})

test_that("'CategoricalColorMapper' model matches prototype", {
  obj <- CategoricalColorMapper$new(id = "38ce2421-0e1d-461a-ad82-a4ff1212504a")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "factors": null,
  "id": "38ce2421-0e1d-461a-ad82-a4ff1212504a",
  "js_callbacks": {},
  "name": null,
  "nan_color": "gray",
  "palette": null,
  "tags": []
}')
})

test_that("'ColorMapper' model matches prototype", {
  obj <- ColorMapper$new(id = "09c00c86-0f01-4b0c-aee2-17560cfdbbd1")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "09c00c86-0f01-4b0c-aee2-17560cfdbbd1",
  "js_callbacks": {},
  "name": null,
  "nan_color": "gray",
  "palette": null,
  "tags": []
}')
})

test_that("'ContinuousColorMapper' model matches prototype", {
  obj <- ContinuousColorMapper$new(id = "e8bc9930-0f03-4548-a05c-3d7277977b4e")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "high": null,
  "high_color": null,
  "id": "e8bc9930-0f03-4548-a05c-3d7277977b4e",
  "js_callbacks": {},
  "low": null,
  "low_color": null,
  "name": null,
  "nan_color": "gray",
  "palette": null,
  "tags": []
}')
})

test_that("'LinearColorMapper' model matches prototype", {
  obj <- LinearColorMapper$new(id = "1d1f13e6-d410-4875-95bb-60538cf685ac")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "high": null,
  "high_color": null,
  "id": "1d1f13e6-d410-4875-95bb-60538cf685ac",
  "js_callbacks": {},
  "low": null,
  "low_color": null,
  "name": null,
  "nan_color": "gray",
  "palette": null,
  "tags": []
}')
})

test_that("'LogColorMapper' model matches prototype", {
  obj <- LogColorMapper$new(id = "d808fef7-b312-44e8-9c5d-8b354002c049")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "high": null,
  "high_color": null,
  "id": "d808fef7-b312-44e8-9c5d-8b354002c049",
  "js_callbacks": {},
  "low": null,
  "low_color": null,
  "name": null,
  "nan_color": "gray",
  "palette": null,
  "tags": []
}')
})

test_that("'Model' model matches prototype", {
  obj <- Model$new(id = "ca214b1b-b6e5-4f1e-90d7-2588bcb83099")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "ca214b1b-b6e5-4f1e-90d7-2588bcb83099",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'Plot' model matches prototype", {
  obj <- Plot$new(id = "5b5f2c41-3c1c-4965-aa25-73922f47892e", tool_events = list(id = "2db04914-27d3-4f31-8ef6-adccfa2b6e55", type = "ToolEvents"), toolbar = list(id = "a21d402b-cd34-424b-81c7-5d981d92b7c5", type = "Toolbar"), x_range = NA, y_range = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "above": [],
  "background_fill_alpha": {
    "value": 1
  },
  "background_fill_color": {
    "value": "#ffffff"
  },
  "below": [],
  "border_fill_alpha": {
    "value": 1
  },
  "border_fill_color": {
    "value": "#ffffff"
  },
  "css_classes": null,
  "disabled": false,
  "extra_x_ranges": {},
  "extra_y_ranges": {},
  "h_symmetry": true,
  "height": null,
  "hidpi": true,
  "id": "5b5f2c41-3c1c-4965-aa25-73922f47892e",
  "js_callbacks": {},
  "left": [],
  "lod_factor": 10,
  "lod_interval": 300,
  "lod_threshold": 2000,
  "lod_timeout": 500,
  "min_border": 5,
  "min_border_bottom": null,
  "min_border_left": null,
  "min_border_right": null,
  "min_border_top": null,
  "name": null,
  "outline_line_alpha": {
    "value": 1
  },
  "outline_line_cap": "butt",
  "outline_line_color": {
    "value": "#e5e5e5"
  },
  "outline_line_dash": [],
  "outline_line_dash_offset": 0,
  "outline_line_join": "miter",
  "outline_line_width": {
    "value": 1
  },
  "plot_height": 600,
  "plot_width": 600,
  "renderers": [],
  "right": [],
  "sizing_mode": "fixed",
  "tags": [],
  "title": {
    "id": "e0831177-9fc9-4ab8-a385-fac5a1584399",
    "type": "Title"
  },
  "title_location": "above",
  "tool_events": {
    "id": "2db04914-27d3-4f31-8ef6-adccfa2b6e55",
    "type": "ToolEvents"
  },
  "toolbar": {
    "id": "a21d402b-cd34-424b-81c7-5d981d92b7c5",
    "type": "Toolbar"
  },
  "toolbar_location": "right",
  "toolbar_sticky": true,
  "v_symmetry": false,
  "webgl": false,
  "width": null,
  "x_mapper_type": "auto",
  "x_range": null,
  "y_mapper_type": "auto",
  "y_range": null
}')
})

test_that("'DataRange' model matches prototype", {
  obj <- DataRange$new(id = "a8b21267-2ff9-43b1-a12d-2b34d1fe26ce")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "id": "a8b21267-2ff9-43b1-a12d-2b34d1fe26ce",
  "js_callbacks": {},
  "name": null,
  "names": [],
  "renderers": [],
  "tags": []
}')
})

test_that("'DataRange1d' model matches prototype", {
  obj <- DataRange1d$new(id = "2f01984b-60cc-4626-b3b7-774cd85db8f5")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "bounds": null,
  "callback": null,
  "default_span": 2,
  "end": null,
  "flipped": false,
  "follow": null,
  "follow_interval": null,
  "id": "2f01984b-60cc-4626-b3b7-774cd85db8f5",
  "js_callbacks": {},
  "max_interval": null,
  "min_interval": null,
  "name": null,
  "names": [],
  "range_padding": 0.1,
  "renderers": [],
  "start": null,
  "tags": []
}')
})

test_that("'FactorRange' model matches prototype", {
  obj <- FactorRange$new(id = "cc6eda92-09d5-477a-a224-2892c6004c3b")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "bounds": null,
  "callback": null,
  "factors": [],
  "id": "cc6eda92-09d5-477a-a224-2892c6004c3b",
  "js_callbacks": {},
  "max_interval": null,
  "min_interval": null,
  "name": null,
  "offset": 0,
  "tags": []
}')
})

test_that("'Range' model matches prototype", {
  obj <- Range$new(id = "9d6f08af-0593-490d-a0fb-7bcd13d8e68d", callback = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "id": "9d6f08af-0593-490d-a0fb-7bcd13d8e68d",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'Range1d' model matches prototype", {
  obj <- Range1d$new(id = "386d059f-3cb3-4bbd-86dd-edc7b9698e72")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "bounds": null,
  "callback": null,
  "end": 1,
  "id": "386d059f-3cb3-4bbd-86dd-edc7b9698e72",
  "js_callbacks": {},
  "max_interval": null,
  "min_interval": null,
  "name": null,
  "start": 0,
  "tags": []
}')
})

test_that("'DataRenderer' model matches prototype", {
  obj <- DataRenderer$new(id = "0e0ca475-8beb-407b-849b-d58ea94bc656")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "0e0ca475-8beb-407b-849b-d58ea94bc656",
  "js_callbacks": {},
  "level": "image",
  "name": null,
  "tags": [],
  "visible": true
}')
})

test_that("'DynamicImageRenderer' model matches prototype", {
  obj <- DynamicImageRenderer$new(id = "6e20d8d0-63d3-45d0-8cbd-ebd8509d510a", image_source = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "alpha": 1,
  "id": "6e20d8d0-63d3-45d0-8cbd-ebd8509d510a",
  "image_source": null,
  "js_callbacks": {},
  "level": "underlay",
  "name": null,
  "render_parents": true,
  "tags": [],
  "visible": true
}')
})

test_that("'GlyphRenderer' model matches prototype", {
  obj <- GlyphRenderer$new(id = "666a21a6-f945-43cb-b30b-04c88b8330e2", data_source = NA, glyph = NA, hover_glyph = NA, nonselection_glyph = NA, selection_glyph = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "data_source": null,
  "glyph": null,
  "hover_glyph": null,
  "id": "666a21a6-f945-43cb-b30b-04c88b8330e2",
  "js_callbacks": {},
  "level": "glyph",
  "name": null,
  "nonselection_glyph": null,
  "selection_glyph": null,
  "tags": [],
  "visible": true,
  "x_range_name": "default",
  "y_range_name": "default"
}')
})

test_that("'GuideRenderer' model matches prototype", {
  obj <- GuideRenderer$new(id = "85eed8a9-e35c-49c2-9240-3048383ad8d2", plot = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "85eed8a9-e35c-49c2-9240-3048383ad8d2",
  "js_callbacks": {},
  "level": "overlay",
  "name": null,
  "plot": null,
  "tags": [],
  "visible": true
}')
})

test_that("'Renderer' model matches prototype", {
  obj <- Renderer$new(id = "b2e501cc-fa2c-4b6e-9ae6-595fcbf79466")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "b2e501cc-fa2c-4b6e-9ae6-595fcbf79466",
  "js_callbacks": {},
  "level": "image",
  "name": null,
  "tags": [],
  "visible": true
}')
})

test_that("'TileRenderer' model matches prototype", {
  obj <- TileRenderer$new(id = "2f58cead-c0ea-475f-8fde-598f4a79fd8e", tile_source = list(id = "1504638a-623d-4756-8209-3b8f1eea7549", type = "WMTSTileSource"))
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "alpha": 1,
  "id": "2f58cead-c0ea-475f-8fde-598f4a79fd8e",
  "js_callbacks": {},
  "level": "underlay",
  "name": null,
  "render_parents": true,
  "tags": [],
  "tile_source": {
    "id": "1504638a-623d-4756-8209-3b8f1eea7549",
    "type": "WMTSTileSource"
  },
  "visible": true,
  "x_range_name": "default",
  "y_range_name": "default"
}')
})

test_that("'AjaxDataSource' model matches prototype", {
  obj <- AjaxDataSource$new(id = "b16d37a0-3398-451b-819c-3e2963dd20d0")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "column_names": [],
  "content_type": "application/json",
  "data": {},
  "data_url": null,
  "http_headers": {},
  "id": "b16d37a0-3398-451b-819c-3e2963dd20d0",
  "if_modified": false,
  "js_callbacks": {},
  "max_size": null,
  "method": "POST",
  "mode": "replace",
  "name": null,
  "polling_interval": null,
  "selected": {
    "0d": {
      "glyph": null,
      "indices": []
    },
    "1d": {
      "indices": []
    },
    "2d": {}
  },
  "tags": []
}')
})

test_that("'ColumnDataSource' model matches prototype", {
  obj <- ColumnDataSource$new(id = "c40499d6-ac2f-43d4-a2e9-3b728eb48a15")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "column_names": [],
  "data": {},
  "id": "c40499d6-ac2f-43d4-a2e9-3b728eb48a15",
  "js_callbacks": {},
  "name": null,
  "selected": {
    "0d": {
      "glyph": null,
      "indices": []
    },
    "1d": {
      "indices": []
    },
    "2d": {}
  },
  "tags": []
}')
})

test_that("'ColumnarDataSource' model matches prototype", {
  obj <- ColumnarDataSource$new(id = "e4e1a426-33af-4b1c-a396-5ac0db1fad28")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "column_names": [],
  "id": "e4e1a426-33af-4b1c-a396-5ac0db1fad28",
  "js_callbacks": {},
  "name": null,
  "selected": {
    "0d": {
      "glyph": null,
      "indices": []
    },
    "1d": {
      "indices": []
    },
    "2d": {}
  },
  "tags": []
}')
})

test_that("'DataSource' model matches prototype", {
  obj <- DataSource$new(id = "86a90b88-25f2-4684-820d-fdeb32d67c64", callback = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "id": "86a90b88-25f2-4684-820d-fdeb32d67c64",
  "js_callbacks": {},
  "name": null,
  "selected": {
    "0d": {
      "glyph": null,
      "indices": []
    },
    "1d": {
      "indices": []
    },
    "2d": {}
  },
  "tags": []
}')
})

test_that("'GeoJSONDataSource' model matches prototype", {
  obj <- GeoJSONDataSource$new(id = "aab9f4a9-720d-4eeb-a9c8-ffbe9c864170")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "column_names": [],
  "geojson": null,
  "id": "aab9f4a9-720d-4eeb-a9c8-ffbe9c864170",
  "js_callbacks": {},
  "name": null,
  "selected": {
    "0d": {
      "glyph": null,
      "indices": []
    },
    "1d": {
      "indices": []
    },
    "2d": {}
  },
  "tags": []
}')
})

test_that("'RemoteSource' model matches prototype", {
  obj <- RemoteSource$new(id = "2c554964-4a44-41d5-ab19-86c4c272341a")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "column_names": [],
  "data": {},
  "data_url": null,
  "id": "2c554964-4a44-41d5-ab19-86c4c272341a",
  "js_callbacks": {},
  "name": null,
  "polling_interval": null,
  "selected": {
    "0d": {
      "glyph": null,
      "indices": []
    },
    "1d": {
      "indices": []
    },
    "2d": {}
  },
  "tags": []
}')
})

test_that("'AdaptiveTicker' model matches prototype", {
  obj <- AdaptiveTicker$new(id = "e4f79663-72c1-43fd-81f7-17770e411eb0")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "base": 10,
  "desired_num_ticks": 6,
  "id": "e4f79663-72c1-43fd-81f7-17770e411eb0",
  "js_callbacks": {},
  "mantissas": [
    1,
    2,
    5
  ],
  "max_interval": null,
  "min_interval": 0,
  "name": null,
  "num_minor_ticks": 5,
  "tags": []
}')
})

test_that("'BasicTicker' model matches prototype", {
  obj <- BasicTicker$new(id = "e3b632c8-de4c-45cd-b088-c4201380ac0f")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "base": 10,
  "desired_num_ticks": 6,
  "id": "e3b632c8-de4c-45cd-b088-c4201380ac0f",
  "js_callbacks": {},
  "mantissas": [
    1,
    2,
    5
  ],
  "max_interval": null,
  "min_interval": 0,
  "name": null,
  "num_minor_ticks": 5,
  "tags": []
}')
})

test_that("'CategoricalTicker' model matches prototype", {
  obj <- CategoricalTicker$new(id = "e290cb7e-986a-4835-b6f8-bf3e179b3237")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "e290cb7e-986a-4835-b6f8-bf3e179b3237",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'CompositeTicker' model matches prototype", {
  obj <- CompositeTicker$new(id = "c68f8f81-9cb0-41fd-8460-cea111cfae51")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "desired_num_ticks": 6,
  "id": "c68f8f81-9cb0-41fd-8460-cea111cfae51",
  "js_callbacks": {},
  "name": null,
  "num_minor_ticks": 5,
  "tags": [],
  "tickers": []
}')
})

test_that("'ContinuousTicker' model matches prototype", {
  obj <- ContinuousTicker$new(id = "04c33cb0-2cea-4849-8952-90b0fc1d522e")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "desired_num_ticks": 6,
  "id": "04c33cb0-2cea-4849-8952-90b0fc1d522e",
  "js_callbacks": {},
  "name": null,
  "num_minor_ticks": 5,
  "tags": []
}')
})

test_that("'DatetimeTicker' model matches prototype", {
  obj <- DatetimeTicker$new(id = "e19b26f6-b745-4269-9ee5-eacebff5c298")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "desired_num_ticks": 6,
  "id": "e19b26f6-b745-4269-9ee5-eacebff5c298",
  "js_callbacks": {},
  "name": null,
  "num_minor_ticks": 0,
  "tags": [],
  "tickers": [
    {
      "id": "e13dfec1-f2a9-4766-bed3-4f0b3b29d7b7",
      "type": "AdaptiveTicker"
    },
    {
      "id": "d3fc30f9-203e-479d-8882-155145484a09",
      "type": "AdaptiveTicker"
    },
    {
      "id": "ebdd82f6-1de4-4c4f-b680-80720ab0926f",
      "type": "AdaptiveTicker"
    },
    {
      "id": "061c100e-4031-4f21-a593-7c2210d8df8f",
      "type": "DaysTicker"
    },
    {
      "id": "882670d8-d5f2-4642-b0d3-627a6585493a",
      "type": "DaysTicker"
    },
    {
      "id": "01ba8333-84c8-4729-b2fc-b572137306a5",
      "type": "DaysTicker"
    },
    {
      "id": "774f16b5-f36f-413a-8388-aa23daf2077c",
      "type": "DaysTicker"
    },
    {
      "id": "8d777901-3dc2-4f54-a77e-31b6760d52af",
      "type": "MonthsTicker"
    },
    {
      "id": "384e89e3-f76e-4a1c-9587-1fb448e16c25",
      "type": "MonthsTicker"
    },
    {
      "id": "c5bfee2f-168b-4a1f-aea9-b5dc57c93036",
      "type": "MonthsTicker"
    },
    {
      "id": "e147212e-957e-4e91-8dc1-e5b9f43cc44d",
      "type": "MonthsTicker"
    },
    {
      "id": "0c715e8a-0ff0-4a88-b6f8-cc1f37f7793b",
      "type": "YearsTicker"
    }
  ]
}')
})

test_that("'DaysTicker' model matches prototype", {
  obj <- DaysTicker$new(id = "e2f8f3a0-5f9c-47cd-be38-da207786698e")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "days": [],
  "desired_num_ticks": 6,
  "id": "e2f8f3a0-5f9c-47cd-be38-da207786698e",
  "interval": null,
  "js_callbacks": {},
  "name": null,
  "num_minor_ticks": 5,
  "tags": []
}')
})

test_that("'FixedTicker' model matches prototype", {
  obj <- FixedTicker$new(id = "ea6ac89d-69fb-4ff7-ab80-2439b9ea5bb8")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "desired_num_ticks": 6,
  "id": "ea6ac89d-69fb-4ff7-ab80-2439b9ea5bb8",
  "js_callbacks": {},
  "name": null,
  "num_minor_ticks": 5,
  "tags": [],
  "ticks": []
}')
})

test_that("'LogTicker' model matches prototype", {
  obj <- LogTicker$new(id = "6e80afcc-b9ce-437b-a22e-be088395f01c")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "base": 10,
  "desired_num_ticks": 6,
  "id": "6e80afcc-b9ce-437b-a22e-be088395f01c",
  "js_callbacks": {},
  "mantissas": [
    1,
    5
  ],
  "max_interval": null,
  "min_interval": 0,
  "name": null,
  "num_minor_ticks": 5,
  "tags": []
}')
})

test_that("'MonthsTicker' model matches prototype", {
  obj <- MonthsTicker$new(id = "584a55f6-7cab-4a7f-b9f7-754a9e4db8e1")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "desired_num_ticks": 6,
  "id": "584a55f6-7cab-4a7f-b9f7-754a9e4db8e1",
  "interval": null,
  "js_callbacks": {},
  "months": [],
  "name": null,
  "num_minor_ticks": 5,
  "tags": []
}')
})

test_that("'SingleIntervalTicker' model matches prototype", {
  obj <- SingleIntervalTicker$new(id = "aca4753b-ad29-449f-a40b-01f2cd4d51ff")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "desired_num_ticks": 6,
  "id": "aca4753b-ad29-449f-a40b-01f2cd4d51ff",
  "interval": null,
  "js_callbacks": {},
  "name": null,
  "num_minor_ticks": 5,
  "tags": []
}')
})

test_that("'Ticker' model matches prototype", {
  obj <- Ticker$new(id = "437fc766-782a-4592-a0d1-f96f3054eddc")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "437fc766-782a-4592-a0d1-f96f3054eddc",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'YearsTicker' model matches prototype", {
  obj <- YearsTicker$new(id = "51e818e7-3f5a-48bd-8cca-fdd9168ea077")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "desired_num_ticks": 6,
  "id": "51e818e7-3f5a-48bd-8cca-fdd9168ea077",
  "interval": null,
  "js_callbacks": {},
  "name": null,
  "num_minor_ticks": 5,
  "tags": []
}')
})

test_that("'BBoxTileSource' model matches prototype", {
  obj <- BBoxTileSource$new(id = "f72665e6-cfd5-4579-b239-f672d9217220")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "attribution": "",
  "extra_url_vars": {},
  "id": "f72665e6-cfd5-4579-b239-f672d9217220",
  "initial_resolution": 156543.03392804097,
  "js_callbacks": {},
  "max_zoom": 30,
  "min_zoom": 0,
  "name": null,
  "tags": [],
  "tile_size": 256,
  "url": "",
  "use_latlon": false,
  "wrap_around": true,
  "x_origin_offset": 20037508.34,
  "y_origin_offset": 20037508.34
}')
})

test_that("'MercatorTileSource' model matches prototype", {
  obj <- MercatorTileSource$new(id = "6a685756-3822-4cfc-af22-261167f9a31e")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "attribution": "",
  "extra_url_vars": {},
  "id": "6a685756-3822-4cfc-af22-261167f9a31e",
  "initial_resolution": 156543.03392804097,
  "js_callbacks": {},
  "max_zoom": 30,
  "min_zoom": 0,
  "name": null,
  "tags": [],
  "tile_size": 256,
  "url": "",
  "wrap_around": true,
  "x_origin_offset": 20037508.34,
  "y_origin_offset": 20037508.34
}')
})

test_that("'QUADKEYTileSource' model matches prototype", {
  obj <- QUADKEYTileSource$new(id = "f582c7af-8bbd-4c91-ba8c-cf3c41bfbdc3")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "attribution": "",
  "extra_url_vars": {},
  "id": "f582c7af-8bbd-4c91-ba8c-cf3c41bfbdc3",
  "initial_resolution": 156543.03392804097,
  "js_callbacks": {},
  "max_zoom": 30,
  "min_zoom": 0,
  "name": null,
  "tags": [],
  "tile_size": 256,
  "url": "",
  "wrap_around": true,
  "x_origin_offset": 20037508.34,
  "y_origin_offset": 20037508.34
}')
})

test_that("'TMSTileSource' model matches prototype", {
  obj <- TMSTileSource$new(id = "e16485dc-7418-45bc-9a17-225c211fb9b7")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "attribution": "",
  "extra_url_vars": {},
  "id": "e16485dc-7418-45bc-9a17-225c211fb9b7",
  "initial_resolution": 156543.03392804097,
  "js_callbacks": {},
  "max_zoom": 30,
  "min_zoom": 0,
  "name": null,
  "tags": [],
  "tile_size": 256,
  "url": "",
  "wrap_around": true,
  "x_origin_offset": 20037508.34,
  "y_origin_offset": 20037508.34
}')
})

test_that("'TileSource' model matches prototype", {
  obj <- TileSource$new(id = "decf2951-1aaf-485f-8a05-9f839bb6070b")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "attribution": "",
  "extra_url_vars": {},
  "id": "decf2951-1aaf-485f-8a05-9f839bb6070b",
  "initial_resolution": null,
  "js_callbacks": {},
  "max_zoom": 30,
  "min_zoom": 0,
  "name": null,
  "tags": [],
  "tile_size": 256,
  "url": "",
  "x_origin_offset": null,
  "y_origin_offset": null
}')
})

test_that("'WMTSTileSource' model matches prototype", {
  obj <- WMTSTileSource$new(id = "1a26ab17-43c2-4d76-af88-70b191ed9c4d")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "attribution": "",
  "extra_url_vars": {},
  "id": "1a26ab17-43c2-4d76-af88-70b191ed9c4d",
  "initial_resolution": 156543.03392804097,
  "js_callbacks": {},
  "max_zoom": 30,
  "min_zoom": 0,
  "name": null,
  "tags": [],
  "tile_size": 256,
  "url": "",
  "wrap_around": true,
  "x_origin_offset": 20037508.34,
  "y_origin_offset": 20037508.34
}')
})

test_that("'Action' model matches prototype", {
  obj <- Action$new(id = "70b843df-7867-4eeb-b649-6e94f9641a90")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "70b843df-7867-4eeb-b649-6e94f9641a90",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'BoxSelectTool' model matches prototype", {
  obj <- BoxSelectTool$new(id = "781dfbb5-8333-4bde-9eec-a28c6f04a3ea", callback = NA, overlay = list(id = "0b99bfd6-b6f1-411b-a47d-c6a08e24dfe0", type = "BoxAnnotation"))
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "dimensions": "both",
  "id": "781dfbb5-8333-4bde-9eec-a28c6f04a3ea",
  "js_callbacks": {},
  "name": null,
  "names": [],
  "overlay": {
    "id": "0b99bfd6-b6f1-411b-a47d-c6a08e24dfe0",
    "type": "BoxAnnotation"
  },
  "plot": null,
  "renderers": [],
  "select_every_mousemove": false,
  "tags": []
}')
})

test_that("'BoxZoomTool' model matches prototype", {
  obj <- BoxZoomTool$new(id = "7cb466c8-5b1b-4dea-bcb5-65a557841a53", overlay = list(id = "423f53ab-83d5-4cff-af06-6735d7bfe414", type = "BoxAnnotation"))
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "dimensions": "both",
  "id": "7cb466c8-5b1b-4dea-bcb5-65a557841a53",
  "js_callbacks": {},
  "match_aspect": false,
  "name": null,
  "overlay": {
    "id": "423f53ab-83d5-4cff-af06-6735d7bfe414",
    "type": "BoxAnnotation"
  },
  "plot": null,
  "tags": []
}')
})

test_that("'CrosshairTool' model matches prototype", {
  obj <- CrosshairTool$new(id = "f574fe31-be92-48ba-a8a3-aca19a981337")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "dimensions": "both",
  "id": "f574fe31-be92-48ba-a8a3-aca19a981337",
  "js_callbacks": {},
  "line_alpha": 1,
  "line_color": "black",
  "line_width": 1,
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'Drag' model matches prototype", {
  obj <- Drag$new(id = "7a3ce531-d026-431c-8bfa-a706eff0a8f6")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "7a3ce531-d026-431c-8bfa-a706eff0a8f6",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'HelpTool' model matches prototype", {
  obj <- HelpTool$new(id = "180e3e78-d244-4000-989f-42007700f6be")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "help_tooltip": "Click the question mark to learn more about Bokeh plot tools.",
  "id": "180e3e78-d244-4000-989f-42007700f6be",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "redirect": "http://bokeh.pydata.org/en/latest/docs/user_guide/tools.html",
  "tags": []
}')
})

test_that("'HoverTool' model matches prototype", {
  obj <- HoverTool$new(id = "17742886-a30f-4a7b-8379-895c3458ce20", callback = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "anchor": "center",
  "attachment": "horizontal",
  "callback": null,
  "id": "17742886-a30f-4a7b-8379-895c3458ce20",
  "js_callbacks": {},
  "line_policy": "prev",
  "mode": "mouse",
  "name": null,
  "names": [],
  "plot": null,
  "point_policy": "snap_to_data",
  "renderers": [],
  "show_arrow": true,
  "tags": [],
  "tooltips": [
    [
      "index",
      "$index"
    ],
    [
      "data (x, y)",
      "($x, $y)"
    ],
    [
      "canvas (x, y)",
      "($sx, $sy)"
    ]
  ]
}')
})

test_that("'Inspection' model matches prototype", {
  obj <- Inspection$new(id = "bc105528-99b5-414d-b960-24ee26e7a5c3")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "bc105528-99b5-414d-b960-24ee26e7a5c3",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'LassoSelectTool' model matches prototype", {
  obj <- LassoSelectTool$new(id = "95954982-9b69-4aa5-9764-20e0c50aefda", callback = NA, overlay = list(id = "6de1c8b7-39be-4d6a-ba75-82d9c23e0cb7", type = "PolyAnnotation"))
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "id": "95954982-9b69-4aa5-9764-20e0c50aefda",
  "js_callbacks": {},
  "name": null,
  "names": [],
  "overlay": {
    "id": "6de1c8b7-39be-4d6a-ba75-82d9c23e0cb7",
    "type": "PolyAnnotation"
  },
  "plot": null,
  "renderers": [],
  "select_every_mousemove": true,
  "tags": []
}')
})

test_that("'PanTool' model matches prototype", {
  obj <- PanTool$new(id = "b0d06e6e-f5a5-43a6-b2ee-818896d64d8b")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "dimensions": "both",
  "id": "b0d06e6e-f5a5-43a6-b2ee-818896d64d8b",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'PolySelectTool' model matches prototype", {
  obj <- PolySelectTool$new(id = "fdee2bff-745d-4241-a0f7-afd25e23211d", overlay = list(id = "4c700d6c-597b-402b-815f-70c8f66b53b7", type = "PolyAnnotation"))
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "fdee2bff-745d-4241-a0f7-afd25e23211d",
  "js_callbacks": {},
  "name": null,
  "names": [],
  "overlay": {
    "id": "4c700d6c-597b-402b-815f-70c8f66b53b7",
    "type": "PolyAnnotation"
  },
  "plot": null,
  "renderers": [],
  "tags": []
}')
})

test_that("'RedoTool' model matches prototype", {
  obj <- RedoTool$new(id = "3a3313ce-8de2-473e-bbab-4bc0e9de3a41")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "3a3313ce-8de2-473e-bbab-4bc0e9de3a41",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'ResetTool' model matches prototype", {
  obj <- ResetTool$new(id = "6bff22e5-f989-4e97-a164-6e9929245389")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "6bff22e5-f989-4e97-a164-6e9929245389",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "reset_size": true,
  "tags": []
}')
})

test_that("'ResizeTool' model matches prototype", {
  obj <- ResizeTool$new(id = "0355f104-2966-43dd-b1bb-5c6277507502")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "0355f104-2966-43dd-b1bb-5c6277507502",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'SaveTool' model matches prototype", {
  obj <- SaveTool$new(id = "e1dfb8fc-2c9e-43a7-afab-e833f9331c8a")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "e1dfb8fc-2c9e-43a7-afab-e833f9331c8a",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'Scroll' model matches prototype", {
  obj <- Scroll$new(id = "a4c225d9-4bf9-458c-9793-9a336e0050f8")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "a4c225d9-4bf9-458c-9793-9a336e0050f8",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'Tap' model matches prototype", {
  obj <- Tap$new(id = "00531a00-4965-4be7-8113-8fdf0f19b7a5")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "00531a00-4965-4be7-8113-8fdf0f19b7a5",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'TapTool' model matches prototype", {
  obj <- TapTool$new(id = "63c2b873-de11-4866-8971-48415ede8fe9", callback = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "behavior": "select",
  "callback": null,
  "id": "63c2b873-de11-4866-8971-48415ede8fe9",
  "js_callbacks": {},
  "name": null,
  "names": [],
  "plot": null,
  "renderers": [],
  "tags": []
}')
})

test_that("'Tool' model matches prototype", {
  obj <- Tool$new(id = "58575087-4f02-4831-9242-fd55858d9bba", plot = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "58575087-4f02-4831-9242-fd55858d9bba",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'ToolEvents' model matches prototype", {
  obj <- ToolEvents$new(id = "af56a4f7-a627-439c-9ea4-7789fe5ba204")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "geometries": [],
  "id": "af56a4f7-a627-439c-9ea4-7789fe5ba204",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'Toolbar' model matches prototype", {
  obj <- Toolbar$new(id = "8ae51a00-9213-4cf7-bdc6-64eec351da71")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "active_drag": "auto",
  "active_scroll": "auto",
  "active_tap": "auto",
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "8ae51a00-9213-4cf7-bdc6-64eec351da71",
  "js_callbacks": {},
  "logo": "normal",
  "name": null,
  "sizing_mode": null,
  "tags": [],
  "tools": [],
  "width": null
}')
})

test_that("'ToolbarBase' model matches prototype", {
  obj <- ToolbarBase$new(id = "8db4767b-6eab-4d43-8959-b8c25770a296")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "8db4767b-6eab-4d43-8959-b8c25770a296",
  "js_callbacks": {},
  "logo": "normal",
  "name": null,
  "sizing_mode": null,
  "tags": [],
  "tools": [],
  "width": null
}')
})

test_that("'ToolbarBox' model matches prototype", {
  obj <- ToolbarBox$new(id = "299ace3c-6d40-47df-8ccd-c70c994654e6")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "children": [],
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "299ace3c-6d40-47df-8ccd-c70c994654e6",
  "js_callbacks": {},
  "logo": "normal",
  "merge_tools": true,
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "toolbar_location": "right",
  "tools": [],
  "width": null
}')
})

test_that("'UndoTool' model matches prototype", {
  obj <- UndoTool$new(id = "bc84b4e7-71a7-4ff7-b416-f284cd42a54a")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "bc84b4e7-71a7-4ff7-b416-f284cd42a54a",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'WheelPanTool' model matches prototype", {
  obj <- WheelPanTool$new(id = "992459c9-5571-4f35-a43f-573e77fe5e95")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "dimension": "width",
  "id": "992459c9-5571-4f35-a43f-573e77fe5e95",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'WheelZoomTool' model matches prototype", {
  obj <- WheelZoomTool$new(id = "2b86d08e-2cd1-450d-991e-c4f9ea544211")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "dimensions": "both",
  "id": "2b86d08e-2cd1-450d-991e-c4f9ea544211",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'ZoomInTool' model matches prototype", {
  obj <- ZoomInTool$new(id = "17030316-3eca-46f0-a836-087626440a25")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "dimensions": "both",
  "factor": 0.1,
  "id": "17030316-3eca-46f0-a836-087626440a25",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'ZoomOutTool' model matches prototype", {
  obj <- ZoomOutTool$new(id = "2bacf620-0f2d-4b7d-abb5-70aa4ebe8ab6")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "dimensions": "both",
  "factor": 0.1,
  "id": "2bacf620-0f2d-4b7d-abb5-70aa4ebe8ab6",
  "js_callbacks": {},
  "name": null,
  "plot": null,
  "tags": []
}')
})

test_that("'Interpolator' model matches prototype", {
  obj <- Interpolator$new(id = "bab0aef5-5ed8-4772-800b-aafc80e12ff8", data = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "clip": true,
  "data": null,
  "id": "bab0aef5-5ed8-4772-800b-aafc80e12ff8",
  "js_callbacks": {},
  "name": null,
  "tags": [],
  "x": null,
  "y": null
}')
})

test_that("'Jitter' model matches prototype", {
  obj <- Jitter$new(id = "376172ce-dcad-42b1-b587-3192cecfc4dd")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "distribution": "uniform",
  "id": "376172ce-dcad-42b1-b587-3192cecfc4dd",
  "js_callbacks": {},
  "mean": 0,
  "name": null,
  "tags": [],
  "width": 1
}')
})

test_that("'LinearInterpolator' model matches prototype", {
  obj <- LinearInterpolator$new(id = "a0c2702b-3f98-4cb2-a4e6-3b686f6f2a2a")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "clip": true,
  "data": null,
  "id": "a0c2702b-3f98-4cb2-a4e6-3b686f6f2a2a",
  "js_callbacks": {},
  "name": null,
  "tags": [],
  "x": null,
  "y": null
}')
})

test_that("'StepInterpolator' model matches prototype", {
  obj <- StepInterpolator$new(id = "92e49f79-6b90-48d1-ba9b-748d71044115")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "clip": true,
  "data": null,
  "id": "92e49f79-6b90-48d1-ba9b-748d71044115",
  "js_callbacks": {},
  "mode": "after",
  "name": null,
  "tags": [],
  "x": null,
  "y": null
}')
})

test_that("'Transform' model matches prototype", {
  obj <- Transform$new(id = "8ba2b586-4ca1-45d5-9568-d8505c3a0b42")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "8ba2b586-4ca1-45d5-9568-d8505c3a0b42",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})



### No test for model: ButtonLike (no json prototype)

test_that("'Dropdown' model matches prototype", {
  obj <- Dropdown$new(id = "68096891-c1e9-4a00-b27e-435d0c9057f3")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "button_type": "default",
  "callback": null,
  "css_classes": null,
  "default_value": null,
  "disabled": false,
  "height": null,
  "icon": null,
  "id": "68096891-c1e9-4a00-b27e-435d0c9057f3",
  "js_callbacks": {},
  "label": "Dropdown",
  "menu": [],
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "value": null,
  "width": null
}')
})

test_that("'Toggle' model matches prototype", {
  obj <- Toggle$new(id = "a1706d29-83e9-4cb9-af77-1c558374635b")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "active": false,
  "button_type": "default",
  "callback": null,
  "css_classes": null,
  "disabled": false,
  "height": null,
  "icon": null,
  "id": "a1706d29-83e9-4cb9-af77-1c558374635b",
  "js_callbacks": {},
  "label": "Toggle",
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "width": null
}')
})

test_that("'AbstractGroup' model matches prototype", {
  obj <- AbstractGroup$new(id = "0697d411-1bf2-4fdc-aa42-0fd9e47a0488", callback = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "0697d411-1bf2-4fdc-aa42-0fd9e47a0488",
  "js_callbacks": {},
  "labels": [],
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "width": null
}')
})

test_that("'CheckboxButtonGroup' model matches prototype", {
  obj <- CheckboxButtonGroup$new(id = "11400d2d-373c-4f39-9f25-eee845e8bc53")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "active": [],
  "button_type": "default",
  "callback": null,
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "11400d2d-373c-4f39-9f25-eee845e8bc53",
  "js_callbacks": {},
  "labels": [],
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "width": null
}')
})

test_that("'CheckboxGroup' model matches prototype", {
  obj <- CheckboxGroup$new(id = "0bb5b4d2-bb90-48b0-8b32-735eadc6a883")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "active": [],
  "callback": null,
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "0bb5b4d2-bb90-48b0-8b32-735eadc6a883",
  "inline": false,
  "js_callbacks": {},
  "labels": [],
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "width": null
}')
})

test_that("'Group' model matches prototype", {
  obj <- Group$new(id = "c12cae24-0fbc-4108-af5c-620342bf9dd4")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "c12cae24-0fbc-4108-af5c-620342bf9dd4",
  "inline": false,
  "js_callbacks": {},
  "labels": [],
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "width": null
}')
})

test_that("'RadioButtonGroup' model matches prototype", {
  obj <- RadioButtonGroup$new(id = "bf760bb0-cba1-4256-83ee-ee20b7eca46b")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "active": null,
  "button_type": "default",
  "callback": null,
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "bf760bb0-cba1-4256-83ee-ee20b7eca46b",
  "js_callbacks": {},
  "labels": [],
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "width": null
}')
})

test_that("'RadioGroup' model matches prototype", {
  obj <- RadioGroup$new(id = "fbb6ba1a-5ca5-43b2-923b-d6fc2f8e63ae")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "active": null,
  "callback": null,
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "fbb6ba1a-5ca5-43b2-923b-d6fc2f8e63ae",
  "inline": false,
  "js_callbacks": {},
  "labels": [],
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "width": null
}')
})

test_that("'AbstractIcon' model matches prototype", {
  obj <- AbstractIcon$new(id = "b4fa67d7-fbe8-4f6d-b767-6a46c89838a2")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "b4fa67d7-fbe8-4f6d-b767-6a46c89838a2",
  "js_callbacks": {},
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "width": null
}')
})

test_that("'AutocompleteInput' model matches prototype", {
  obj <- AutocompleteInput$new(id = "c934b7ba-d653-4168-949d-49c55aff1f2d")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "completions": [],
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "c934b7ba-d653-4168-949d-49c55aff1f2d",
  "js_callbacks": {},
  "name": null,
  "placeholder": "",
  "sizing_mode": "fixed",
  "tags": [],
  "title": "",
  "value": "",
  "width": null
}')
})

test_that("'DatePicker' model matches prototype", {
  obj <- DatePicker$new(id = "f0d3f111-15c8-4639-a637-cf3300014238", callback = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "f0d3f111-15c8-4639-a637-cf3300014238",
  "js_callbacks": {},
  "max_date": null,
  "min_date": null,
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "title": "",
  "value": 1483920000000,
  "width": null
}')
})

test_that("'DateRangeSlider' model matches prototype", {
  obj <- DateRangeSlider$new(id = "0fcf6d2e-5564-4668-98ae-08e274c9b36b", callback = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "arrows": true,
  "bounds": null,
  "callback": null,
  "css_classes": null,
  "disabled": false,
  "enabled": true,
  "height": null,
  "id": "0fcf6d2e-5564-4668-98ae-08e274c9b36b",
  "js_callbacks": {},
  "name": null,
  "range": null,
  "sizing_mode": "fixed",
  "step": {},
  "tags": [],
  "title": "",
  "value": null,
  "value_labels": "show",
  "wheel_mode": null,
  "width": null
}')
})

test_that("'InputWidget' model matches prototype", {
  obj <- InputWidget$new(id = "a658348e-4af6-4595-ac80-d8221fab7235")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "a658348e-4af6-4595-ac80-d8221fab7235",
  "js_callbacks": {},
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "title": "",
  "width": null
}')
})

test_that("'MultiSelect' model matches prototype", {
  obj <- MultiSelect$new(id = "7e5e5bf6-4ed0-4fc2-bb3b-43c998b01b74", callback = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "7e5e5bf6-4ed0-4fc2-bb3b-43c998b01b74",
  "js_callbacks": {},
  "name": null,
  "options": [],
  "size": 4,
  "sizing_mode": "fixed",
  "tags": [],
  "title": "",
  "value": [],
  "width": null
}')
})

test_that("'RangeSlider' model matches prototype", {
  obj <- RangeSlider$new(id = "33615095-aead-4502-8648-a3aeeb63fa67", callback = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "callback_policy": "throttle",
  "callback_throttle": 200,
  "css_classes": null,
  "disabled": false,
  "end": 1,
  "height": null,
  "id": "33615095-aead-4502-8648-a3aeeb63fa67",
  "js_callbacks": {},
  "name": null,
  "orientation": "horizontal",
  "range": [
    0.1,
    0.9
  ],
  "sizing_mode": "fixed",
  "start": 0,
  "step": 0.1,
  "tags": [],
  "title": "",
  "width": null
}')
})

test_that("'Select' model matches prototype", {
  obj <- Select$new(id = "9f413e37-eef8-4645-b770-2203f15eae5f", callback = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "9f413e37-eef8-4645-b770-2203f15eae5f",
  "js_callbacks": {},
  "name": null,
  "options": [],
  "sizing_mode": "fixed",
  "tags": [],
  "title": "",
  "value": "",
  "width": null
}')
})

test_that("'Slider' model matches prototype", {
  obj <- Slider$new(id = "1bcbd64c-ef7d-436b-b23f-84373761eee5", callback = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "callback_policy": "throttle",
  "callback_throttle": 200,
  "css_classes": null,
  "disabled": false,
  "end": 1,
  "height": null,
  "id": "1bcbd64c-ef7d-436b-b23f-84373761eee5",
  "js_callbacks": {},
  "name": null,
  "orientation": "horizontal",
  "sizing_mode": "fixed",
  "start": 0,
  "step": 0.1,
  "tags": [],
  "title": "",
  "value": 0.5,
  "width": null
}')
})

test_that("'TextInput' model matches prototype", {
  obj <- TextInput$new(id = "322d7f19-3f14-4d44-bc36-337d9edd48ce", callback = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "callback": null,
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "322d7f19-3f14-4d44-bc36-337d9edd48ce",
  "js_callbacks": {},
  "name": null,
  "placeholder": "",
  "sizing_mode": "fixed",
  "tags": [],
  "title": "",
  "value": "",
  "width": null
}')
})

test_that("'Div' model matches prototype", {
  obj <- Div$new(id = "51c715af-7a22-4ac1-af47-45036607e55c")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "51c715af-7a22-4ac1-af47-45036607e55c",
  "js_callbacks": {},
  "name": null,
  "render_as_text": false,
  "sizing_mode": "fixed",
  "tags": [],
  "text": "",
  "width": null
}')
})

test_that("'Markup' model matches prototype", {
  obj <- Markup$new(id = "5622f0a1-5a76-4e81-b7fe-f4e97a0bb769")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "5622f0a1-5a76-4e81-b7fe-f4e97a0bb769",
  "js_callbacks": {},
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "text": "",
  "width": null
}')
})

test_that("'Paragraph' model matches prototype", {
  obj <- Paragraph$new(id = "8122a2a0-2081-411c-a1de-c9448e9c0177")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "8122a2a0-2081-411c-a1de-c9448e9c0177",
  "js_callbacks": {},
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "text": "",
  "width": null
}')
})

test_that("'PreText' model matches prototype", {
  obj <- PreText$new(id = "20ce2041-ee9c-45a8-a864-7c6b0168b9ae")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "20ce2041-ee9c-45a8-a864-7c6b0168b9ae",
  "js_callbacks": {},
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "text": "",
  "width": null
}')
})

test_that("'Panel' model matches prototype", {
  obj <- Panel$new(id = "747baf83-feea-4c82-927f-472085da7d9d", child = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "child": null,
  "closable": false,
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "747baf83-feea-4c82-927f-472085da7d9d",
  "js_callbacks": {},
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "title": "",
  "width": null
}')
})

test_that("'Tabs' model matches prototype", {
  obj <- Tabs$new(id = "136de12f-5328-438a-b4b9-ece4073b34b9", callback = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "active": 0,
  "callback": null,
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "136de12f-5328-438a-b4b9-ece4073b34b9",
  "js_callbacks": {},
  "name": null,
  "sizing_mode": "fixed",
  "tabs": [],
  "tags": [],
  "width": null
}')
})

test_that("'BooleanFormatter' model matches prototype", {
  obj <- BooleanFormatter$new(id = "6e5dd9cd-8d42-4826-8ea8-303253744ef8")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "icon": "check",
  "id": "6e5dd9cd-8d42-4826-8ea8-303253744ef8",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'CellEditor' model matches prototype", {
  obj <- CellEditor$new(id = "b1a4f8dd-ea92-4877-adf1-e165594a1f84")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "b1a4f8dd-ea92-4877-adf1-e165594a1f84",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'CellFormatter' model matches prototype", {
  obj <- CellFormatter$new(id = "96363867-f742-44ce-8965-2af84f65a891")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "96363867-f742-44ce-8965-2af84f65a891",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'CheckboxEditor' model matches prototype", {
  obj <- CheckboxEditor$new(id = "dbe2780a-97a1-4242-a553-60f345f40e9d")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "dbe2780a-97a1-4242-a553-60f345f40e9d",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'DataTable' model matches prototype", {
  obj <- DataTable$new(id = "60a6f2f4-5ce8-43e2-a1b2-34f0b0526fdc")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "columns": [],
  "css_classes": null,
  "disabled": false,
  "editable": false,
  "fit_columns": true,
  "height": 400,
  "id": "60a6f2f4-5ce8-43e2-a1b2-34f0b0526fdc",
  "js_callbacks": {},
  "name": null,
  "row_headers": true,
  "scroll_to_selection": true,
  "selectable": true,
  "sizing_mode": "fixed",
  "sortable": true,
  "source": null,
  "tags": [],
  "width": null
}')
})

test_that("'DateEditor' model matches prototype", {
  obj <- DateEditor$new(id = "885ab24e-390d-4be2-8b10-d05c01540e03")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "885ab24e-390d-4be2-8b10-d05c01540e03",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'DateFormatter' model matches prototype", {
  obj <- DateFormatter$new(id = "a9c8830f-4bc7-4119-a257-cace44788118")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "format": "yy M d",
  "id": "a9c8830f-4bc7-4119-a257-cace44788118",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'HTMLTemplateFormatter' model matches prototype", {
  obj <- HTMLTemplateFormatter$new(id = "35c429d5-30e5-4bd7-838f-4b4490839c7b")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "35c429d5-30e5-4bd7-838f-4b4490839c7b",
  "js_callbacks": {},
  "name": null,
  "tags": [],
  "template": "<%= value %>"
}')
})

test_that("'IntEditor' model matches prototype", {
  obj <- IntEditor$new(id = "74f4da94-7b81-47b4-b420-f878b9cace4c")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "74f4da94-7b81-47b4-b420-f878b9cace4c",
  "js_callbacks": {},
  "name": null,
  "step": 1,
  "tags": []
}')
})

test_that("'NumberEditor' model matches prototype", {
  obj <- NumberEditor$new(id = "fbccae89-ca6b-4215-aacf-48585ce22af6")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "fbccae89-ca6b-4215-aacf-48585ce22af6",
  "js_callbacks": {},
  "name": null,
  "step": 01,
  "tags": []
}')
})

test_that("'NumberFormatter' model matches prototype", {
  obj <- NumberFormatter$new(id = "bba2f690-8264-4898-ad52-fe1ae16ec932")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "font_style": "normal",
  "format": "0,0",
  "id": "bba2f690-8264-4898-ad52-fe1ae16ec932",
  "js_callbacks": {},
  "language": "en",
  "name": null,
  "rounding": "round",
  "tags": [],
  "text_align": "left",
  "text_color": null
}')
})

test_that("'PercentEditor' model matches prototype", {
  obj <- PercentEditor$new(id = "c1e4453f-ce82-497b-b2fa-1022571d48ec")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "c1e4453f-ce82-497b-b2fa-1022571d48ec",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'SelectEditor' model matches prototype", {
  obj <- SelectEditor$new(id = "cef0097b-51de-4cd4-a48c-e5f6fec46fe9")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "cef0097b-51de-4cd4-a48c-e5f6fec46fe9",
  "js_callbacks": {},
  "name": null,
  "options": [],
  "tags": []
}')
})

test_that("'StringEditor' model matches prototype", {
  obj <- StringEditor$new(id = "fb5adcf0-d0cf-4e40-a9d9-782465caa46e")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "completions": [],
  "id": "fb5adcf0-d0cf-4e40-a9d9-782465caa46e",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'StringFormatter' model matches prototype", {
  obj <- StringFormatter$new(id = "98cb23a7-ea42-4e12-8c4c-51c1a6cb1c80")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "font_style": "normal",
  "id": "98cb23a7-ea42-4e12-8c4c-51c1a6cb1c80",
  "js_callbacks": {},
  "name": null,
  "tags": [],
  "text_align": "left",
  "text_color": null
}')
})

test_that("'TableColumn' model matches prototype", {
  obj <- TableColumn$new(id = "a9a64332-d20e-4a63-9b63-3bf65f62b07b", editor = list(id = "59f4b588-6a18-4ad8-b28e-c170d56b436c", type = "StringEditor"), formatter = list(id = "fe8693e4-3e72-4aa5-992d-47c9f2ccf265", type = "StringFormatter"))
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "default_sort": "ascending",
  "editor": {
    "id": "59f4b588-6a18-4ad8-b28e-c170d56b436c",
    "type": "StringEditor"
  },
  "field": null,
  "formatter": {
    "id": "fe8693e4-3e72-4aa5-992d-47c9f2ccf265",
    "type": "StringFormatter"
  },
  "id": "a9a64332-d20e-4a63-9b63-3bf65f62b07b",
  "js_callbacks": {},
  "name": null,
  "sortable": true,
  "tags": [],
  "title": null,
  "width": 300
}')
})

test_that("'TableWidget' model matches prototype", {
  obj <- TableWidget$new(id = "04124627-d8dd-4dae-8eb6-160c8380c4c7", source = NA)
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "04124627-d8dd-4dae-8eb6-160c8380c4c7",
  "js_callbacks": {},
  "name": null,
  "sizing_mode": "fixed",
  "source": null,
  "tags": [],
  "width": null
}')
})

test_that("'TextEditor' model matches prototype", {
  obj <- TextEditor$new(id = "9da763f2-0a01-4f30-b2a9-5aba014833fb")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "9da763f2-0a01-4f30-b2a9-5aba014833fb",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'TimeEditor' model matches prototype", {
  obj <- TimeEditor$new(id = "83a163f8-59a8-4c49-9b5e-cd4b0c1ccbd5")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "id": "83a163f8-59a8-4c49-9b5e-cd4b0c1ccbd5",
  "js_callbacks": {},
  "name": null,
  "tags": []
}')
})

test_that("'Widget' model matches prototype", {
  obj <- Widget$new(id = "fbcab11e-7818-488a-9877-83307837756c")
  jsn <- as.character(obj$to_json(pretty = TRUE))
  expect_identical(jsn,
'{
  "css_classes": null,
  "disabled": false,
  "height": null,
  "id": "fbcab11e-7818-488a-9877-83307837756c",
  "js_callbacks": {},
  "name": null,
  "sizing_mode": "fixed",
  "tags": [],
  "width": null
}')
})
hafen/rbokeh-models documentation built on May 17, 2019, 2:23 p.m.