test('model invalid type', function(done, fail) { try { var d1 = models('does not exist trololo'); fail(); } catch(e) { done(); } });
return require('requests').get(url).done(function(data) { var cache = models(model); console.groupCollapsed('Casting ' + model + 's to model cache...'); data.objects.forEach(function(obj) { cache.cast(obj); }); console.groupEnd(); });
helpers.model_lookup = function(model, key, by) { return models(model).lookup(key, by); };
return require('requests').get(url).done(function(data) { var cache = models(model); data.objects.forEach(function(obj) { cache.cast(obj); }); });