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

21 add update submission function to submission repo #25

Closed

Conversation

jcadam14
Copy link
Contributor

Closes #21

Needed to pull in parts of #7 to be able to actually run the tests. The only files actually touched in this story are listed below.

Additions

  • Added update_submission function to submission_repo.py

Removals

Changes

  • Rewrote the test_update_submission function in test_submission_repo.py

Testing

Screenshots

Notes

Todos

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows the standards laid out in the development playbook
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Visually tested in supported browsers and devices (see checklist below 👇)
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist

Browsers

  • Chrome
  • Firefox
  • Safari
  • Internet Explorer 8, 9, 10, and 11
  • Edge
  • iOS Safari
  • Chrome for Android

Accessibility

  • Keyboard friendly
  • Screen reader friendly

Other

  • Is useable without CSS
  • Is useable without JS
  • Flexible from small to large screens
  • No linting errors or warnings
  • JavaScript tests are passing

Added pytests to test the update_submission fuction.  Please
note the comment on the _generator_function in test_submission_repo.py
Needed to merge in parts from story #7
Updated the test_submission_repo to mock out SessionLocal in entities engine
Updated the test_update_submission to use the session_generator fixture
Updated the test to use different contexts for querying and updating
Updated the submission_repo update_submission function to take an optional Session
@jcadam14 jcadam14 self-assigned this Jan 11, 2024
@jcadam14 jcadam14 linked an issue Jan 11, 2024 that may be closed by this pull request
@jcadam14
Copy link
Contributor Author

Closing this since it's outdated, will redo needed work and PR

@jcadam14 jcadam14 closed this Jan 19, 2024
lchen-2101 pushed a commit that referenced this pull request Jan 31, 2024
Closes #25 

- Added update_submission fuction to submission_repo.py
- Added test_update_submission function to pytest using SessionLocal
mock and session_generator to simulate multiple sessions and transaction
doing updates and fetches
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.

Add update submission function to submission_repo
1 participant