Fixing case where __len__ was being called on a mock object to test
truthiness