fix error in unittest sinon