def test_property_groups(): with _get_portal_connection() as connection: property_group_to_create = PropertyGroup('propertygrouptest') created_property_group = \ create_property_group(property_group_to_create, connection) eq_(property_group_to_create.name, created_property_group.name) all_property_groups = get_all_property_groups(connection) assert_in(created_property_group, all_property_groups) delete_property_group(created_property_group.name, connection) all_property_groups = get_all_property_groups(connection) assert_not_in(created_property_group, all_property_groups)
def test_property_group_deletion(): property_group_name = 'property_group_name' simulator = DeletePropertyGroup(property_group_name) with MockPortalConnection(simulator) as connection: assert_is_none(delete_property_group(property_group_name, connection))