'An exit with subprocess exit 1 is what paver receives when there is
an npm install error ("cb() never called!"). Test that we can handle
this kind of failure. For more info see TE-1767.'

def test_npm_install_with_subprocess_error(self):

    self._mock_paver_sh.side_effect = fail_on_npm_install
    with self.assertRaises(BuildFailure):
        node_prereqs_installation()
    actual_calls = self._mock_paver_sh.mock_calls
    self.assertEqual(actual_calls.count(call('npm    install')), 2)
