       ticker: ticker
       formatter: formatter
     })
-    test_plot_canvas.add_layout(@axis, 'below')
-    # Must create the test_plot_view after adding the axis to the plot
-    test_plot_canvas_view = new test_plot_canvas.default_view({ 'model': test_plot_canvas })
+    plot = new Plot({
+      x_range: new Range1d({start: 0, end: 1})
+      y_range: new Range1d({start: 0, end: 1})
+      toolbar: new Toolbar()
+    })
+    plot.add_layout(@axis, 'below')
+    plot.attach_document(doc)
+    plot_canvas = new PlotCanvas({ 'plot': plot })
+    plot_canvas.attach_document(doc)
+    plot_canvas_view = new plot_canvas.default_view({ 'model': plot_canvas })
     @axis_view = new @axis.default_view({
       model: @axis
-      plot_model: test_plot_canvas
-      plot_view: test_plot_canvas_view
+      plot_model: plot_canvas
+      plot_view: plot_canvas_view
     })
 
   it "_tick_extent should return the major_tick_out property", ->

describe "Axis.Model", ->

  it "should have a SidePanel after add_panel is called", ->
    pp = new Plot({
      x_range: new Range1d({start: 0, end: 1})
      y_range: new Range1d({start: 0, end: 1})
    })
    p = pp.plot_canvas
    p.attach_document(new Document())
    ticker = new BasicTicker()
    formatter = new BasicTickFormatter()

    utils.stub_canvas()
    solver_stubs = utils.stub_solver()

    doc = new Document()
    ticker = new BasicTicker()
    formatter = new BasicTickFormatter()
    @axis = new Axis({
