fix tests and pep8

```
======================================================================
ERROR: Failure: ImportError (No module named shmir_api.database)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/loader.py", line 414, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/shmir/shmir/src/shmir/tests/test_shmir_designer.py", line 12, in <module>
    from shmir_api.database import database
ImportError: No module named shmir_api.database

----------------------------------------------------------------------
```