Pulp 2 Tests
latest
  • Installation
  • Configuration
  • Contributing
  • Usage
  • Tests
    • pulp_2_tests
    • pulp_2_tests.constants
    • pulp_2_tests.tests
    • pulp_2_tests.tests.docker
    • pulp_2_tests.tests.docker.api_v2
    • pulp_2_tests.tests.docker.api_v2.test_copy
    • pulp_2_tests.tests.docker.api_v2.test_crud
    • pulp_2_tests.tests.docker.api_v2.test_duplicate_uploads
    • pulp_2_tests.tests.docker.api_v2.test_remove
    • pulp_2_tests.tests.docker.api_v2.test_sync
    • pulp_2_tests.tests.docker.api_v2.test_sync_publish
    • pulp_2_tests.tests.docker.api_v2.test_tags
    • pulp_2_tests.tests.docker.api_v2.test_upload
    • pulp_2_tests.tests.docker.api_v2.utils
    • pulp_2_tests.tests.docker.cli
    • pulp_2_tests.tests.docker.cli.test_crud
    • pulp_2_tests.tests.docker.cli.test_sync_publish
    • pulp_2_tests.tests.docker.cli.utils
    • pulp_2_tests.tests.docker.utils
    • pulp_2_tests.tests.ostree
    • pulp_2_tests.tests.ostree.api_v2
    • pulp_2_tests.tests.ostree.api_v2.test_copy
    • pulp_2_tests.tests.ostree.api_v2.test_crud
    • pulp_2_tests.tests.ostree.api_v2.test_publish
    • pulp_2_tests.tests.ostree.api_v2.test_sync
    • pulp_2_tests.tests.ostree.utils
    • pulp_2_tests.tests.platform
    • pulp_2_tests.tests.platform.api_v2
    • pulp_2_tests.tests.platform.api_v2.test_consumer
    • pulp_2_tests.tests.platform.api_v2.test_content_applicability
    • pulp_2_tests.tests.platform.api_v2.test_login
    • pulp_2_tests.tests.platform.api_v2.test_repository
    • pulp_2_tests.tests.platform.api_v2.test_search
    • pulp_2_tests.tests.platform.api_v2.test_user
    • pulp_2_tests.tests.platform.api_v2.utils
    • pulp_2_tests.tests.platform.cli
    • pulp_2_tests.tests.platform.cli.test_pulp_manage_db
    • pulp_2_tests.tests.platform.cli.test_selinux
    • pulp_2_tests.tests.platform.utils
    • pulp_2_tests.tests.puppet
    • pulp_2_tests.tests.puppet.api_v2
    • pulp_2_tests.tests.puppet.api_v2.test_crud
    • pulp_2_tests.tests.puppet.api_v2.test_duplicate_uploads
    • pulp_2_tests.tests.puppet.api_v2.test_install_distributor
    • pulp_2_tests.tests.puppet.api_v2.test_sync_publish
    • pulp_2_tests.tests.puppet.api_v2.utils
    • pulp_2_tests.tests.puppet.cli
    • pulp_2_tests.tests.puppet.cli.test_sync
    • pulp_2_tests.tests.puppet.utils
    • pulp_2_tests.tests.python
    • pulp_2_tests.tests.python.api_v2
    • pulp_2_tests.tests.python.api_v2.test_crud
    • pulp_2_tests.tests.python.api_v2.test_duplicate_uploads
    • pulp_2_tests.tests.python.api_v2.test_sync_publish
    • pulp_2_tests.tests.python.api_v2.utils
    • pulp_2_tests.tests.python.utils
    • pulp_2_tests.tests.rpm
    • pulp_2_tests.tests.rpm.api_v2
    • pulp_2_tests.tests.rpm.api_v2.test_broker
    • pulp_2_tests.tests.rpm.api_v2.test_character_encoding
    • pulp_2_tests.tests.rpm.api_v2.test_comps_xml
    • pulp_2_tests.tests.rpm.api_v2.test_content_applicability
    • pulp_2_tests.tests.rpm.api_v2.test_content_sources
    • pulp_2_tests.tests.rpm.api_v2.test_copy
    • pulp_2_tests.tests.rpm.api_v2.test_crud
    • pulp_2_tests.tests.rpm.api_v2.test_download_policies
    • pulp_2_tests.tests.rpm.api_v2.test_duplicate_uploads
    • pulp_2_tests.tests.rpm.api_v2.test_errata
    • pulp_2_tests.tests.rpm.api_v2.test_export
    • pulp_2_tests.tests.rpm.api_v2.test_force_full
    • pulp_2_tests.tests.rpm.api_v2.test_iso_crud
    • pulp_2_tests.tests.rpm.api_v2.test_iso_sync_publish
    • pulp_2_tests.tests.rpm.api_v2.test_mirrorlist
    • pulp_2_tests.tests.rpm.api_v2.test_modularity
    • pulp_2_tests.tests.rpm.api_v2.test_no_op_publish
    • pulp_2_tests.tests.rpm.api_v2.test_orphan_remove
    • pulp_2_tests.tests.rpm.api_v2.test_package_paths
    • pulp_2_tests.tests.rpm.api_v2.test_remove_unit
    • pulp_2_tests.tests.rpm.api_v2.test_repomd
    • pulp_2_tests.tests.rpm.api_v2.test_repository_layout
    • pulp_2_tests.tests.rpm.api_v2.test_repoview
    • pulp_2_tests.tests.rpm.api_v2.test_republish
    • pulp_2_tests.tests.rpm.api_v2.test_retain_old_count
    • pulp_2_tests.tests.rpm.api_v2.test_rich_weak_dependencies
    • pulp_2_tests.tests.rpm.api_v2.test_rsync_distributor
    • pulp_2_tests.tests.rpm.api_v2.test_schedule_publish
    • pulp_2_tests.tests.rpm.api_v2.test_schedule_sync
    • pulp_2_tests.tests.rpm.api_v2.test_search
    • pulp_2_tests.tests.rpm.api_v2.test_service_resiliency
    • pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_copies
    • pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs
    • pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_uploads
    • pulp_2_tests.tests.rpm.api_v2.test_signatures_saved_for_packages
    • pulp_2_tests.tests.rpm.api_v2.test_sync_publish
    • pulp_2_tests.tests.rpm.api_v2.test_tasks
    • pulp_2_tests.tests.rpm.api_v2.test_unassociate
    • pulp_2_tests.tests.rpm.api_v2.test_unavailable_checksum
    • pulp_2_tests.tests.rpm.api_v2.test_updateinfo
    • pulp_2_tests.tests.rpm.api_v2.test_upload_publish
    • pulp_2_tests.tests.rpm.api_v2.utils
    • pulp_2_tests.tests.rpm.cli
    • pulp_2_tests.tests.rpm.cli.test_character_encoding
    • pulp_2_tests.tests.rpm.cli.test_copy_units
    • pulp_2_tests.tests.rpm.cli.test_environments
    • pulp_2_tests.tests.rpm.cli.test_langpacks
    • pulp_2_tests.tests.rpm.cli.test_process_recycling
    • pulp_2_tests.tests.rpm.cli.test_retain_old_count
    • pulp_2_tests.tests.rpm.cli.test_search
    • pulp_2_tests.tests.rpm.cli.test_sync
    • pulp_2_tests.tests.rpm.cli.test_upload
    • pulp_2_tests.tests.rpm.cli.utils
    • pulp_2_tests.tests.rpm.utils
Pulp 2 Tests
  • Docs »
  • Tests »
  • pulp_2_tests.tests.rpm.api_v2.test_search
  • Edit on GitHub

pulp_2_tests.tests.rpm.api_v2.test_search¶

Location: Pulp 2 Tests → Tests → pulp_2_tests.tests.rpm.api_v2.test_search

Test Pulp’s Searching facilities.

The test cases in this module searches for content units by their type. See:

  • Pulp Smash #133 asks for tests showing that it’s possible to search for content units by their type.
  • The Search for Units API documentation is relevant.
class pulp_2_tests.tests.rpm.api_v2.test_search.BaseSearchTestCase(*args, **kwargs)¶

Bases: pulp_smash.pulp2.utils.BaseAPITestCase

Provide common functionality for the other test cases in this module.

static get_feed_url()¶

Return a repository feed URL. Used by setUpClass().

All child classes should override this method.

get_unit_by_filename(units, filename)¶

Return the unit with the given filename.

Test methods in child classes may find this method to be of use.

Parameters:
  • units – An iterable of SRPM content units.
  • filename – The filename of one of the content units.
Returns:

The content unit with the given filename.

Raises:

An assertion error if more or less than one matching unit is found.

classmethod setUpClass()¶

Create and sync a repository.

class pulp_2_tests.tests.rpm.api_v2.test_search.SearchForRpmTestCase(*args, **kwargs)¶

Bases: pulp_2_tests.tests.rpm.api_v2.test_search.BaseSearchTestCase

Search for rpm content units in several different ways.

static get_feed_url()¶

Return an RPM repository feed URL.

test_include_repos()¶

Search for all “rpm” units, and include repos in the results.

Perform the following searches. Assert a unit with filename pulp_2_tests.constants.RPM is in the search results, and assert it belongs to the repository created in BaseSearchTestCase.setUpClass().

GET {'include_repos': True} (urlencoded)
POST {'criteria': {}, 'include_repos': True}
test_search_for_all()¶

Search for all “rpm” units.

Perform the following searches. Assert a unit with filename pulp_2_tests.constants.RPM is in the search results.

GET n/a
POST {'criteria': {}}
class pulp_2_tests.tests.rpm.api_v2.test_search.SearchForSrpmTestCase(*args, **kwargs)¶

Bases: pulp_2_tests.tests.rpm.api_v2.test_search.BaseSearchTestCase

Search for srpm content units in several different ways.

static get_feed_url()¶

Return an RPM repository feed URL.

test_include_repos()¶

Search for all “srpm” units, and include repos in the results.

Perform the following searches. Assert a unit with filename pulp_2_tests.constants.SRPM is in the search results, and assert it belongs to the repository created in BaseSearchTestCase.setUpClass().

GET {'include_repos': True} (urlencoded)
POST {'criteria': {}, 'include_repos': True}
test_search_for_all()¶

Search for all “srpm” units.

Perform the following searches. Assert a unit with filename pulp_2_tests.constants.SRPM is in the search results.

GET n/a
POST {'criteria': {}}
Next Previous

© Copyright 2018, Pulp QE Revision 8b72b80a.

Built with Sphinx using a theme provided by Read the Docs.