fix(ci): var shadowing and proper mocking
This commit is contained in:
parent
07756d5da8
commit
3f713131eb
1 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
describe('cp.scrape', function()
|
describe('cp.scrape', function()
|
||||||
local scrape
|
local scrape
|
||||||
local mock_cache
|
local mock_cache
|
||||||
|
local mock_utils
|
||||||
local mock_system_calls
|
local mock_system_calls
|
||||||
local temp_files
|
local temp_files
|
||||||
local spec_helper = require('spec.spec_helper')
|
local spec_helper = require('spec.spec_helper')
|
||||||
|
|
@ -45,7 +46,7 @@ describe('cp.scrape', function()
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
local mock_utils = {
|
mock_utils = {
|
||||||
setup_python_env = function()
|
setup_python_env = function()
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
|
|
@ -178,14 +179,13 @@ describe('cp.scrape', function()
|
||||||
|
|
||||||
it('handles python environment setup failure', function()
|
it('handles python environment setup failure', function()
|
||||||
local cache = require('cp.cache')
|
local cache = require('cp.cache')
|
||||||
local utils = require('cp.utils')
|
|
||||||
|
|
||||||
cache.load = function() end
|
cache.load = function() end
|
||||||
cache.get_contest_data = function()
|
cache.get_contest_data = function()
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
utils.setup_python_env = function()
|
mock_utils.setup_python_env = function()
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue