Fixing tests and fixing the app to pass the tests

* tox added to start tests
* tested with newest django versions
* some fixes in tests and fixing the code to pass the testing
* removing some trailing whitespaces