Changies to make tests work

We will need to find proper solutions for db.Models inheritance and
data formating.
Took changes that made tests work

To run tests
$ py.test tests/views