inveniosoftware/invenio — pull request #1834 by greut (2014-06-17 07:57:01+00:00)
Title: base: demosite cleanup

```python
>>> Going to load demo records...
Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/pu/bin/inveniomanage", line 9, in
load_entry_point('Invenio==1.9999', 'console_scripts', 'inveniomanage')()
File "/home/vagrant/invenio/invenio/base/manage.py", line 103, in main
manager.run()
File "/home/vagrant/.virtualenvs/pu/local/lib/python2.7/site-packages/flask_script/__init__.py", line 412, in run
result = self.handle(sys.argv[0], sys.argv[1:])
File "/home/vagrant/.virtualenvs/pu/local/lib/python2.7/site-packages/flask_script/__init__.py", line 383, in handle
res = handle(*args, **config)
File "/home/vagrant/.virtualenvs/pu/local/lib/python2.7/site-packages/flask_script/commands.py", line 216, in __call__
return self.run(*args, **kwargs)
File "/home/vagrant/invenio/invenio/ext/script/__init__.py", line 137, in wrapper
result = f(*args, **kwds)
File "/home/vagrant/invenio/invenio/base/scripts/demosite.py", line 74, in populate
'demo_record_marc_data.xml'))]
File "/home/vagrant/.virtualenvs/pu/local/lib/python2.7/site-packages/pkg_resources.py", line 895, in resource_filename
return get_provider(package_or_requirement).get_resource_filename(
File "/home/vagrant/.virtualenvs/pu/local/lib/python2.7/site-packages/pkg_resources.py", line 229, in get_provider
__import__(moduleOrReq)
File "/home/vagrant/invenio/invenio/testsuite/__init__.py", line 135, in
from flask.ext.testing import TestCase
File "/home/vagrant/.virtualenvs/pu/local/lib/python2.7/site-packages/flask/exthook.py", line 87, in load_module
raise ImportError('No module named %s' % fullname)
ImportError: No module named flask.ext.testing
```
### Problem
```python
pkg_resources.resource_filename('invenio.testsuite', '...')
```
This does a `import invenio.testsuite` which loads everything (but the kitchen sink). In this case, it imports `Flask-Testing` which is no longer a core dependency but only in `tests_require`).

### Solution

Do not load `invenio.testsuite`.
```python
pkg_resources.resource_filename('invenio', os.path.join('testsuite', '...'))
```

### Changes

* Prevents the demosite command to load the testsuite init script.
* PEP8/PEP257