operations.rst 858 B

123456789101112131415161718192021222324252627
  1. ****************
  2. Named operations
  3. ****************
  4. launchpadlib can transparently determine the size of the list even
  5. when the size is not directly provided, but is only available through
  6. a link.
  7. >>> from launchpadlib.testing.helpers import salgado_with_full_permissions
  8. >>> launchpad = salgado_with_full_permissions.login(version="devel")
  9. >>> results = launchpad.people.find(text='s')
  10. >>> 'total_size' in results._wadl_resource.representation.keys()
  11. False
  12. >>> 'total_size_link' in results._wadl_resource.representation.keys()
  13. True
  14. >>> len(results) > 1
  15. True
  16. Of course, launchpadlib can also determine the size when the size _is_
  17. directly provided.
  18. >>> results = launchpad.people.find(text='salgado')
  19. >>> 'total_size' in results._wadl_resource.representation.keys()
  20. True
  21. >>> len(results) == 1
  22. True