getnikola/nikola — pull request #1239 by tburette (2014-04-14 16:32:21+00:00)
Title: Dependency on mock causes crash on init

Fixes the following crash when doing `nikola init` (with no target specified)
```Traceback (most recent call last):
File "nikola/testnikola/env/lib/python2.7/site-packages/doit/doit_cmd.py", line 120, in run
return command.parse_execute(args)
File "nikola/testnikola/env/lib/python2.7/site-packages/doit/cmd_base.py", line 78, in parse_execute
return self.execute(params, args)
File "nikola/scripts/../nikola/plugin_categories.py", line 98, in execute
self._execute(options, args)
File "nikola/nikola/plugins/command/init.py", line 386, in _execute
if isinstance(target, mm):
TypeError: isinstance() arg 2 must be a class, type, or tuple of classes and types```

This crash happens when the optional `requirements-tests.txt` depencies are not installed. Which they are not when doing `pip install nikola`.I removed the dependency on mock.

The code in init.py sets the target to None during testing which doesn't make sense. `target` can not be None because `ask_questions` forces a value from the user. I changed the tests to reflect that.