def test_almond_set(self): arjsb = AlmondRJSBuild('app/app', '/abc/def', '/ghi/out.js', {'abcd': 'efgh'}, mock.Mock()) with mock.patch('sett.requirejs.which'): command = arjsb.get_command(almond='aldmond_path') self.assertEqual(set(command[3:]), { 'name=aldmond_path', 'include=app/app', 'insertRequire=app/app', })
def test_almond_unset(self): arjsb = AlmondRJSBuild('app/app', '/abc/def', '/ghi/out.js', {'abcd': 'efgh'}, mock.Mock()) with mock.patch('sett.requirejs.which'): with mock.patch('sett.requirejs.NODE_MODULES', path('/abc/node_modules')): command = arjsb.get_command() self.assertEqual(set(command[3:]), { 'include=app/app', 'name=../node_modules/almond/almond', 'insertRequire=app/app', })