Tests

This PR increases the unit-tests coverage: http://jenkins.cloud.fedoraproject.org/job/fedocal/449/cobertura/

Which of course lead to a number of bug-fixes :)
I added it when before moving to ``'#' in..`` (so when it was still relying on a ``.count()``) and pondered about afterward.

It's not really needed, but on the other side, it's not doing any harm either, so I went the lazy way and left it. I'm ok with removing it if we prefer.