l.r.s.t.t.TestSharingService(TestCaseWithFactory) : class documentation

Part of lp.registry.services.tests.test_sharingservice View In Hierarchy

Tests for the SharingService.
Method setUp Undocumented
Method test_getSharingPermissions Undocumented
Method test_getInformationTypes_product Undocumented
Method test_getInformationTypes_expired_commercial_product Undocumented
Method test_getInformationTypes_commercial_product Undocumented
Method test_getInformationTypes_product_with_embargoed Undocumented
Method test_getInformationTypes_distro Undocumented
Method test_getBranchSharingPolicies_product Undocumented
Method test_getBranchSharingPolicies_expired_commercial_product Undocumented
Method test_getBranchSharingPolicies_commercial_product Undocumented
Method test_getBugSharingPolicies_non_public_product Undocumented
Method test_getBranchSharingPolicies_non_public_product Undocumented
Method test_getSpecificationSharingPolicies_non_public_product Undocumented
Method test_getBranchSharingPolicies_disallowed_policy Undocumented
Method test_getBranchSharingPolicies_product_with_embargoed Undocumented
Method test_getBranchSharingPolicies_distro Undocumented
Method test_getSpecificationSharingPolicies_product Undocumented
Method test_getSpecificationSharingPolicies_expired_commercial_product Undocumented
Method test_getSpecificationSharingPolicies_commercial_product Undocumented
Method test_getSpecificationSharingPolicies_product_with_embargoed Undocumented
Method test_getSpecificationSharingPolicies_distro Undocumented
Method test_getBugSharingPolicies_product Undocumented
Method test_getBugSharingPolicies_expired_commercial_product Undocumented
Method test_getBugSharingPolicies_commercial_product Undocumented
Method test_getBugSharingPolicies_disallowed_policy Undocumented
Method test_getBugSharingPolicies_distro Undocumented
Method test_jsonGranteeData_with_Some Undocumented
Method test_jsonGranteeData_without_Some Undocumented
Method test_jsonGranteeData_with_icon Undocumented
Method test_getProductGranteeData Undocumented
Method test_getDistroGranteeData Undocumented
Method test_getPillarGranteesQueryCount Undocumented
Method test_getPillarGranteeDataQueryCount Undocumented
Method test_getPillarGranteeDataAnonymous Undocumented
Method test_getPillarGranteeDataAnyone Undocumented
Method test_getProductGrantees Undocumented
Method test_getDistroGrantees Undocumented
Method test_getPillarGranteesAnonymous Undocumented
Method test_getPillarGranteesAnyone Undocumented
Method test_updateProjectGroupGrantee_not_allowed Undocumented
Method test_updateProductGrantee Undocumented
Method test_updateDistroGrantee Undocumented
Method test_updatePillarGrantee_no_access_grants_remain Undocumented
Method test_granteePillarInformationInvisibleInformationTypes Undocumented
Method test_sharePillarInformationAnonymous Undocumented
Method test_sharePillarInformationAnyone Undocumented
Method test_deleteProductGranteeAll Undocumented
Method test_deleteProductGranteeSelectedPolicies Undocumented
Method test_deleteDistroGranteeAll Undocumented
Method test_deleteDistroGranteeSelectedPolicies Undocumented
Method test_deletePillarGranteeInvisibleInformationTypes Undocumented
Method test_deletePillarGranteeAnonymous Undocumented
Method test_deletePillarGranteeAnyone Undocumented
Method test_granteeUnsubscribedWhenDeleted Undocumented
Method test_granteeUnsubscribedWhenDeletedSelectedPolicies Undocumented
Method test_revokeAccessGrantsBugs Undocumented
Method test_revokeAccessGrantsBranches Undocumented
Method test_revokeAccessGrantsGitRepositories Undocumented
Method test_revokeAccessGrantsSpecifications Undocumented
Method test_revokeTeamAccessGrantsBugs Undocumented
Method test_revokeTeamAccessGrantsBranches Undocumented
Method test_revokeTeamAccessGrantsGitRepositories Undocumented
Method test_revokeTeamAccessGrantsSpecifications Undocumented
Method test_revokeAccessGrantsAnonymous Undocumented
Method test_revokeAccessGrantsAnyone Undocumented
Method test_revokeAccessGrants_without_artifacts Undocumented
Method test_ensureAccessGrantsBugs Undocumented
Method test_ensureAccessGrantsBranches Undocumented
Method test_ensureAccessGrantsGitRepositories Undocumented
Method test_ensureAccessGrantsSpecifications Undocumented
Method test_ensureAccessGrantsExisting Undocumented
Method test_ensureAccessGrantsAnonymous Undocumented
Method test_ensureAccessGrantsAnyone Undocumented
Method test_updatePillarBugSharingPolicy Undocumented
Method test_updatePillarBranchSharingPolicy Undocumented
Method test_updatePillarSharingPoliciesAnonymous Undocumented
Method test_updatePillarSharingPoliciesAnyone Undocumented
Method create_shared_artifacts Undocumented
Method test_getSharedArtifacts Undocumented
Method test_getSharedProjects_anonymous Undocumented
Method test_getSharedProjects_admin Undocumented
Method test_getSharedProjects_commercial_admin_current Undocumented
Method test_getSharedProjects_commercial_admin_expired Undocumented
Method test_getSharedProjects_commercial_admin_owner Undocumented
Method test_getSharedProjects_commercial_admin_driver Undocumented
Method test_getSharedProjects_owner Undocumented
Method test_getSharedProjects_driver Undocumented
Method test_getSharedDistributions_anonymous Undocumented
Method test_getSharedDistributions_admin Undocumented
Method test_getSharedDistributions_owner Undocumented
Method test_getSharedDistributions_driver Undocumented
Method test_getSharedBugs Undocumented
Method test_getSharedBranches Undocumented
Method test_getSharedGitRepositories Undocumented
Method test_getSharedSpecifications Undocumented
Method test_getPeopleWithAccessBugs Undocumented
Method test_getPeopleWithAccessBranches Undocumented
Method test_getPeopleWithAccessGitRepositories Undocumented
Method test_getVisibleArtifacts Undocumented
Method test_getVisibleArtifacts_grant_on_pillar Undocumented
Method test_getInvisibleArtifacts Undocumented
Method test_getVisibleArtifacts_bug_policy_change Undocumented
Method test_getVisibleArtifacts_bugtask_retarget Undocumented
Method test_checkPillarAccess Undocumented
Method test_checkPillarAccess_no_policy Undocumented
Method test_getAccessPolicyGrantCounts Undocumented
Method test_getAccessPolicyGrantCountsZero Undocumented
Method _makeGranteeData Undocumented
Method _assert_enumData Undocumented
Method _assert_getAllowedInformationTypes Undocumented
Method _assert_getBranchSharingPolicies Undocumented
Method _assert_getSpecificationSharingPolicies Undocumented
Method _assert_getBugSharingPolicies Undocumented
Method _assert_getPillarGranteeData Undocumented
Method _assert_QueryCount getPillarGrantees[Data] only should use 3 queries.
Method _assert_getPillarGranteeDataUnauthorized Undocumented
Method _assert_getPillarGrantees Undocumented
Method _assert_getPillarGranteesUnauthorized Undocumented
Method _assert_grantee_data Undocumented
Method _assert_sharePillarInformation sharePillarInformations works and returns the expected data.
Method _assert_sharePillarInformationUnauthorized Undocumented
Method _assert_deletePillarGrantee Undocumented
Method _assert_deletePillarGranteeUnauthorized Undocumented
Method _assert_deleteGranteeRemoveSubscriptions Undocumented
Method _assert_revokeAccessGrants Undocumented
Method _assert_revokeTeamAccessGrants Undocumented
Method _assert_revokeAccessGrantsUnauthorized Undocumented
Method _assert_ensureAccessGrants Undocumented
Method _assert_ensureAccessGrantsUnauthorized Undocumented
Method _assert_updatePillarSharingPoliciesUnauthorized Undocumented
Method _assert_getSharedProjects Undocumented
Method _assert_getSharedDistributions Undocumented
Method _assert_getPeopleWithoutAccess Undocumented
Method _make_Artifacts Undocumented
Method _assert_getVisibleArtifacts_bug_change Undocumented

Inherited from TestCaseWithFactory:

Method getUserBrowser Return a Browser logged in as a fresh user, maybe opened at url.
Method getNonRedirectingBrowser Undocumented
Method createBranchAtURL Create a branch at the supplied URL.
Method create_branch_and_tree Create a database branch, bzr branch and bzr checkout.
Method createBzrBranch Create a bzr branch for a database branch.
Static Method getBranchPath Return the path of the branch in the mirrored area.
Method useTempBzrHome Undocumented
Method useBzrBranches Prepare for using bzr branches.

Inherited from TestCase (via TestCaseWithFactory):

Method becomeDbUser Commit, then log into the database as dbuser.
Method __str__ The string representation of a test is its id.
Method useContext Use the supplied context in this test.
Method makeTemporaryDirectory Create a temporary directory, and return its path.
Method installKarmaRecorder Set up and return a KarmaRecorder.
Method assertProvides Assert 'obj' correctly provides 'interface'.
Method assertNotifies Assert that a callable performs a given notification.
Method assertNoNotification Assert that no notifications are generated by the callable.
Method assertSqlAttributeEqualsDate Fail unless the value of the attribute is equal to the date.
Method assertTextMatchesExpressionIgnoreWhitespace Undocumented
Method assertIsInstance Assert that an instance is an instance of assert_class.
Method assertIsNot Assert that expected is not the same object as observed.
Method assertContentEqual Assert that 'iter1' has the same content as 'iter2'.
Method assertRaisesWithContent Check if the given exception is raised with given content.
Method assertBetween Assert that 'variable' is strictly between two boundaries.
Method assertVectorEqual Apply assertEqual to all given pairs in one go.
Method expectedLog Expect a log to be written that matches the regex.
Method pushConfig Push some key-value pairs into a section of the config.
Method attachOopses Undocumented
Method attachLibrarianLog Include the logChunks from fixture in the test details.
Method assertStatementCount Assert that the expected number of SQL statements occurred.
Method useTempDir Use a temporary directory for this test.
Method assertEmailHeadersEqual Assert that two email headers are equal.
Method assertStartsWith Undocumented
Method assertEndsWith Asserts that s ends with suffix.
Method checkPermissions Check if the used_permissions match expected_permissions.
Method assertEmailQueueLength Pop the email queue, assert its length, and return it.
Method _unfoldEmailHeader Unfold a multiline email header.
def setUp(self):
Undocumented
def _makeGranteeData(self, grantee, policy_permissions, shared_artifact_types):
Undocumented
def test_getSharingPermissions(self):
Undocumented
def _assert_enumData(self, expected_enums, enum_data):
Undocumented
def _assert_getAllowedInformationTypes(self, pillar, expected_policies):
Undocumented
def test_getInformationTypes_product(self):
Undocumented
def test_getInformationTypes_expired_commercial_product(self):
Undocumented
def test_getInformationTypes_commercial_product(self):
Undocumented
def test_getInformationTypes_product_with_embargoed(self):
Undocumented
def test_getInformationTypes_distro(self):
Undocumented
def _assert_getBranchSharingPolicies(self, pillar, expected_policies):
Undocumented
def test_getBranchSharingPolicies_product(self):
Undocumented
def test_getBranchSharingPolicies_expired_commercial_product(self):
Undocumented
def test_getBranchSharingPolicies_commercial_product(self):
Undocumented
def test_getBugSharingPolicies_non_public_product(self):
Undocumented
def test_getBranchSharingPolicies_non_public_product(self):
Undocumented
def test_getSpecificationSharingPolicies_non_public_product(self):
Undocumented
def test_getBranchSharingPolicies_disallowed_policy(self):
Undocumented
def test_getBranchSharingPolicies_product_with_embargoed(self):
Undocumented
def test_getBranchSharingPolicies_distro(self):
Undocumented
def _assert_getSpecificationSharingPolicies(self, pillar, expected_policies):
Undocumented
def test_getSpecificationSharingPolicies_product(self):
Undocumented
def test_getSpecificationSharingPolicies_expired_commercial_product(self):
Undocumented
def test_getSpecificationSharingPolicies_commercial_product(self):
Undocumented
def test_getSpecificationSharingPolicies_product_with_embargoed(self):
Undocumented
def test_getSpecificationSharingPolicies_distro(self):
Undocumented
def _assert_getBugSharingPolicies(self, pillar, expected_policies):
Undocumented
def test_getBugSharingPolicies_product(self):
Undocumented
def test_getBugSharingPolicies_expired_commercial_product(self):
Undocumented
def test_getBugSharingPolicies_commercial_product(self):
Undocumented
def test_getBugSharingPolicies_disallowed_policy(self):
Undocumented
def test_getBugSharingPolicies_distro(self):
Undocumented
def test_jsonGranteeData_with_Some(self):
Undocumented
def test_jsonGranteeData_without_Some(self):
Undocumented
def test_jsonGranteeData_with_icon(self):
Undocumented
def _assert_getPillarGranteeData(self, pillar, pillar_type=None):
Undocumented
def test_getProductGranteeData(self):
Undocumented
def test_getDistroGranteeData(self):
Undocumented
def _assert_QueryCount(self, func, count):
getPillarGrantees[Data] only should use 3 queries.

  1. load access policies for pillar
  2. load grantees
  3. load permissions for grantee

Steps 2 and 3 are split out to allow batching on persons.

def test_getPillarGranteesQueryCount(self):
Undocumented
def test_getPillarGranteeDataQueryCount(self):
Undocumented
def _assert_getPillarGranteeDataUnauthorized(self, pillar):
Undocumented
def test_getPillarGranteeDataAnonymous(self):
Undocumented
def test_getPillarGranteeDataAnyone(self):
Undocumented
def _assert_getPillarGrantees(self, pillar, pillar_type=None):
Undocumented
def test_getProductGrantees(self):
Undocumented
def test_getDistroGrantees(self):
Undocumented
def _assert_getPillarGranteesUnauthorized(self, pillar):
Undocumented
def test_getPillarGranteesAnonymous(self):
Undocumented
def test_getPillarGranteesAnyone(self):
Undocumented
def _assert_grantee_data(self, expected, actual):
Undocumented
def _assert_sharePillarInformation(self, pillar, pillar_type=None):
sharePillarInformations works and returns the expected data.
def test_updateProjectGroupGrantee_not_allowed(self):
Undocumented
def test_updateProductGrantee(self):
Undocumented
def test_updateDistroGrantee(self):
Undocumented
def test_updatePillarGrantee_no_access_grants_remain(self):
Undocumented
def test_granteePillarInformationInvisibleInformationTypes(self):
Undocumented
def _assert_sharePillarInformationUnauthorized(self, pillar):
Undocumented
def test_sharePillarInformationAnonymous(self):
Undocumented
def test_sharePillarInformationAnyone(self):
Undocumented
def _assert_deletePillarGrantee(self, pillar, types_to_delete=None, pillar_type=None):
Undocumented
def test_deleteProductGranteeAll(self):
Undocumented
def test_deleteProductGranteeSelectedPolicies(self):
Undocumented
def test_deleteDistroGranteeAll(self):
Undocumented
def test_deleteDistroGranteeSelectedPolicies(self):
Undocumented
def test_deletePillarGranteeInvisibleInformationTypes(self):
Undocumented
def _assert_deletePillarGranteeUnauthorized(self, pillar):
Undocumented
def test_deletePillarGranteeAnonymous(self):
Undocumented
def test_deletePillarGranteeAnyone(self):
Undocumented
def _assert_deleteGranteeRemoveSubscriptions(self, types_to_delete=None):
Undocumented
def test_granteeUnsubscribedWhenDeleted(self):
Undocumented
def test_granteeUnsubscribedWhenDeletedSelectedPolicies(self):
Undocumented
def _assert_revokeAccessGrants(self, pillar, bugs, branches, gitrepositories, specifications):
Undocumented
def test_revokeAccessGrantsBugs(self):
Undocumented
def test_revokeAccessGrantsBranches(self):
Undocumented
def test_revokeAccessGrantsGitRepositories(self):
Undocumented
def test_revokeAccessGrantsSpecifications(self):
Undocumented
def _assert_revokeTeamAccessGrants(self, pillar, bugs, branches, gitrepositories, specifications):
Undocumented
def test_revokeTeamAccessGrantsBugs(self):
Undocumented
def test_revokeTeamAccessGrantsBranches(self):
Undocumented
def test_revokeTeamAccessGrantsGitRepositories(self):
Undocumented
def test_revokeTeamAccessGrantsSpecifications(self):
Undocumented
def _assert_revokeAccessGrantsUnauthorized(self):
Undocumented
def test_revokeAccessGrantsAnonymous(self):
Undocumented
def test_revokeAccessGrantsAnyone(self):
Undocumented
def test_revokeAccessGrants_without_artifacts(self):
Undocumented
def _assert_ensureAccessGrants(self, user, bugs, branches, gitrepositories, specifications, grantee=None):
Undocumented
def test_ensureAccessGrantsBugs(self):
Undocumented
def test_ensureAccessGrantsBranches(self):
Undocumented
def test_ensureAccessGrantsGitRepositories(self):
Undocumented
def test_ensureAccessGrantsSpecifications(self):
Undocumented
def test_ensureAccessGrantsExisting(self):
Undocumented
def _assert_ensureAccessGrantsUnauthorized(self, user):
Undocumented
def test_ensureAccessGrantsAnonymous(self):
Undocumented
def test_ensureAccessGrantsAnyone(self):
Undocumented
def test_updatePillarBugSharingPolicy(self):
Undocumented
def test_updatePillarBranchSharingPolicy(self):
Undocumented
def _assert_updatePillarSharingPoliciesUnauthorized(self, user):
Undocumented
def test_updatePillarSharingPoliciesAnonymous(self):
Undocumented
def test_updatePillarSharingPoliciesAnyone(self):
Undocumented
def create_shared_artifacts(self, product, grantee, user):
Undocumented
def test_getSharedArtifacts(self):
Undocumented
def _assert_getSharedProjects(self, product, who=None):
Undocumented
def test_getSharedProjects_anonymous(self):
Undocumented
def test_getSharedProjects_admin(self):
Undocumented
def test_getSharedProjects_commercial_admin_current(self):
Undocumented
def test_getSharedProjects_commercial_admin_expired(self):
Undocumented
def test_getSharedProjects_commercial_admin_owner(self):
Undocumented
def test_getSharedProjects_commercial_admin_driver(self):
Undocumented
def test_getSharedProjects_owner(self):
Undocumented
def test_getSharedProjects_driver(self):
Undocumented
def _assert_getSharedDistributions(self, distro, who=None):
Undocumented
def test_getSharedDistributions_anonymous(self):
Undocumented
def test_getSharedDistributions_admin(self):
Undocumented
def test_getSharedDistributions_owner(self):
Undocumented
def test_getSharedDistributions_driver(self):
Undocumented
def test_getSharedBugs(self):
Undocumented
def test_getSharedBranches(self):
Undocumented
def test_getSharedGitRepositories(self):
Undocumented
def test_getSharedSpecifications(self):
Undocumented
def test_getPeopleWithAccessBugs(self):
Undocumented
def test_getPeopleWithAccessBranches(self):
Undocumented
def test_getPeopleWithAccessGitRepositories(self):
Undocumented
def _assert_getPeopleWithoutAccess(self, product, artifact):
Undocumented
def _make_Artifacts(self):
Undocumented
def test_getVisibleArtifacts(self):
Undocumented
def test_getVisibleArtifacts_grant_on_pillar(self):
Undocumented
def test_getInvisibleArtifacts(self):
Undocumented
def _assert_getVisibleArtifacts_bug_change(self, change_callback):
Undocumented
def test_getVisibleArtifacts_bug_policy_change(self):
Undocumented
def test_getVisibleArtifacts_bugtask_retarget(self):
Undocumented
def test_checkPillarAccess(self):
Undocumented
def test_checkPillarAccess_no_policy(self):
Undocumented
def test_getAccessPolicyGrantCounts(self):
Undocumented
def test_getAccessPolicyGrantCountsZero(self):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.