Added tests pointed out by coverage.py.
Merge pull request #426 from opdemand/more-tests

Added some tests pointed out by coverage.py.