def test_circ_policy_exist_name_and_organisation_pid(circ_policy): """.""" cipo = circ_policy.replace_refs() assert CircPolicy.exist_name_and_organisation_pid( cipo.get('name'), cipo.get('organisation', {}).get('pid')) assert not CircPolicy.exist_name_and_organisation_pid( 'not exists yet', cipo.get('organisation', {}).get('pid'))
def test_circ_policy_exist_name_and_organisation_pid( circ_policy_short_martigny): """Test policy name existence.""" cipo = circ_policy_short_martigny.replace_refs() assert CircPolicy.exist_name_and_organisation_pid( cipo.get('name'), cipo.get('organisation', {}).get('pid')) assert not CircPolicy.exist_name_and_organisation_pid( 'not exists yet', cipo.get('organisation', {}).get('pid'))