Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some tests for ordered sets to verify that they are unique by slug & locale #389

Merged
merged 2 commits into from
Nov 28, 2024

Conversation

HawkiesZA
Copy link
Contributor

@HawkiesZA HawkiesZA commented Nov 26, 2024

Purpose

Ordered sets were unique by name, now they are unique by slug and locale. We want to verify that that is true.

Solution

I added some more tests

Checklist

  • Added or updated unit tests
  • Added to release notes
  • Updated readme/documentation (if necessary)

@HawkiesZA HawkiesZA self-assigned this Nov 26, 2024
) -> None:
"""
Importing CSV for ordered content sets with a duplicate name but unique slugs
should not throw an error.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here we have duplicate names and slugs, and it seems like the action is to only choose one of them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I would expect the last one in the file to take effect because we don't do a full file scan up front to see if there are duplicates in the file.

If we only had non-unique names and 2 sets with the same name then it's anyone's guess which one would be updated.

I'll update the comment.

@HawkiesZA HawkiesZA merged commit ee15e9c into main Nov 28, 2024
2 checks passed
@HawkiesZA HawkiesZA deleted the add-ordered-set-tests branch November 28, 2024 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants