 sinon = require("sinon")
 runAsync = require("../../helpers/run-async")
 {Bucket} = require("../../../oxalis/model/binary/bucket")
+
+mockRequire.stopAll()
 
 MultipartData = require("../../../libs/multipart_data")
 # FileReader is not available in node context

  return "--multipart-boundary--xxxxxxxxxxxxxxxxxxxxxxxx--"
mockRequire("../../../libs/request", MultipartData)

describe "PullQueue", ->

  RequestMock = null

  dataSetName = "dataset"
  layer = {

  connectionInfo = null

  beforeEach ->

    cube = {
      BUCKET_SIZE_P : 5
