Ported tests to Django.
refactor structure