Update tests.py

Problem #7 - wrote a unit test for it