diff --git a/test/datastore/request.js b/test/datastore/request.js index 6a990b1c8dc..24677aff71f 100644 --- a/test/datastore/request.js +++ b/test/datastore/request.js @@ -14,7 +14,7 @@ * limitations under the License. */ -/*global describe, it, beforeEach */ +/*global describe, it, beforeEach, after */ 'use strict'; @@ -30,6 +30,7 @@ var Query = require('../../lib/datastore/query.js'); var Stream = require('stream'); var util = require('../../lib/common/util.js'); +var httpsRequestCached = https.request; var httpsRequestOverride = util.noop; extend(true, https, { @@ -78,6 +79,10 @@ describe('Request', function() { }; }); + after(function() { + https.request = httpsRequestCached; + }); + describe('get', function() { it('should get by key', function(done) { request.makeReq_ = function(method, req, callback) {