Python 2.6 compatibility in tests

Signed-off-by: Martin Milata <mmilata@redhat.com>