def test_patron_type_exist_name_and_organisation_pid( patron_type_children_martigny): """Test patron type name uniquness.""" org_pid = extracted_data_from_ref( patron_type_children_martigny.get('organisation')) assert PatronType.exist_name_and_organisation_pid( patron_type_children_martigny.get('name'), org_pid) assert not PatronType.exist_name_and_organisation_pid( 'not exists yet', org_pid)
def test_patron_type_exist_name_and_organisation_pid(patron_type): """.""" ptty = patron_type.replace_refs() assert PatronType.exist_name_and_organisation_pid( ptty.get('name'), ptty.get('organisation', {}).get('pid')) assert not PatronType.exist_name_and_organisation_pid( 'not exists yet', ptty.get('organisation', {}).get('pid'))
def test_patron_type_exist_name_and_organisation_pid( patron_type_children_martigny): """Test patron type name uniquness.""" ptty = patron_type_children_martigny.replace_refs() assert PatronType.exist_name_and_organisation_pid( ptty.get('name'), ptty.get('organisation', {}).get('pid')) assert not PatronType.exist_name_and_organisation_pid( 'not exists yet', ptty.get('organisation', {}).get('pid'))