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

Additional Tests to reinforce API filtering for Preprints [OSF-7418] #6828

Conversation

erinspace
Copy link
Member

Purpose

There was some question previously about being able to get all "types" of preprints using the API preprint filter.

The general understanding was that Preprints can be in a few states (from the linked Jira ticket)

  1. Valid - has a published preprint with a non-orphaned file
  2. Orphaned - has a published preprint with an orphaned file
  3. Abandoned - has a non-published preprint, file status irrelevant
  4. None - Has no preprints of any kind associated

2, 3, and 4 should be included when ?filter[preprint]=false, 1 for true

This PR adds a few tests that better ensure that these conditions are met, specifically for double checking orphaned and abandoned preprints

Changes

  • tests to check that orphaned preprints appear in filter[preprint]=False and NOT in filter[preprint]=True
  • tests to check that un-pubublished (abandoned) preprints appear in filter[preprint]=False and NOT in filter[preprint]=True

Side effects

None

Notes!

I think some of the confusion on the Jira ticket revolved around API behavior when the PreprintService is deleted, what happens to the Node that corresponds? I do believe this ticket in general was for the preprint filter, in the above states, and not with Node - PreprintService object relationships.

Ticket

https://openscience.atlassian.net/browse/OSF-7418

@sloria sloria merged commit 4b94cd6 into CenterForOpenScience:develop Feb 7, 2017
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.

None yet

2 participants