 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

          expect(buckets[1].getData()).toEqual(bucketData2)
          done()
      ])

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

RequestMock = {
  always : (promise, func) -> promise.then(func, func)
  sendArraybufferReceiveArraybuffer : sinon.stub()
  foo : 0
}
mockRequire("../../../libs/request", RequestMock)

PullQueue = require("../../../oxalis/model/binary/pullqueue")

describe "PullQueue", ->

  dataSetName = "dataset"
  layer = {
