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 grants unit tests #9511

Merged
merged 3 commits into from
Sep 27, 2021
Merged

Add grants unit tests #9511

merged 3 commits into from
Sep 27, 2021

Conversation

jeremyschuurmans
Copy link
Contributor

@jeremyschuurmans jeremyschuurmans commented Sep 22, 2021

Description

add-grants-unit-tests rebased onto master

This PR contains the prep work done for adding unit testing to the grants models. It doesn't contain any new tests.

The extract-grants-models-into-individual-files branch was merged into this branch (extract-grants ... was already approved previously) and this branch was then rebased onto master, so this PR contains work already approved.

I verified that each of the new model files were exactly like the models in the original models.py file, including any recent changes that occurred after the original work on this was done.

Some of the changes in this PR are irrelevant to the work I did and appear to be formatting adjustments that occurred when I ran make fix

For easy reference, those files are:

  • app/app/context.py
  • app/app/db.py
  • app/app/urls.py
  • app/app/utils.py
  • app/avatar/models.py
  • app/dataviz/d3_views.py
Refers/Fixes
Testing

No tests yet, as this is prep work for adding more tests.

Jeremy Schuurmans added 2 commits September 22, 2021 13:33
* create new directory for models, copy over Contribution model

* extract grants models to individual files

* rename relocated_models directory, remove original models directory, add imports, resolve circular dependencies

* extract CLRMatch into separate file

* extract Flag into separate file

* extract MatchPledge to separate file

* extract Donation and PhantomFunding

* extract GrantStat into separate file

* refactor

* extract GrantBrandingRoutingPolicy to separate file

* update migration

* add missing import to MatchPledge, remove imports from __init__.py

* add missing import

* decouple GrantCLRCalculation and move to own file

* extract GrantType to own file

* extract GrantCLR to own file

* add missing import

* refactor, add missing imports

* remove whitespace

* resolve circular dependency

* run 'make fix'

* import changes from #9314

* add try/except to migration file instead of editing migration directly

* refactor
Copy link
Contributor

@gdixon gdixon left a comment

Choose a reason for hiding this comment

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

LGTM!! Thank you @Jer-Sch!! 😄 🚀

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.

4 participants