Skip to content

Conversation

@jeremyschuurmans
Copy link

Description

This PR adds a unit test for the GrantCategory model

Refers/Fixes
Testing

@jeremyschuurmans jeremyschuurmans marked this pull request as draft September 15, 2021 20:43
@jeremyschuurmans jeremyschuurmans changed the title Test GrantCategory WIP: 6/Test GrantCategory Sep 15, 2021
@jeremyschuurmans jeremyschuurmans force-pushed the add-grants-unit-tests branch 3 times, most recently from 69bb98a to 81f1318 Compare September 22, 2021 18:35
@jeremyschuurmans jeremyschuurmans marked this pull request as ready for review September 22, 2021 22:30
@jeremyschuurmans jeremyschuurmans changed the title WIP: 6/Test GrantCategory 6/Test GrantCategory Sep 22, 2021
@jeremyschuurmans jeremyschuurmans changed the base branch from add-grants-unit-tests to master September 27, 2021 20:26
Jeremy Schuurmans added 5 commits September 28, 2021 11:07
* 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 gitcoinco#9314

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

* refactor
CHECKOUT_TYPES = [
('eth_std', 'eth_std'),
('eth_zksync', 'eth_zksync'),
('eth_polygon', 'eth_polygon'),
Copy link
Contributor

@thelostone-mc thelostone-mc Sep 29, 2021

Choose a reason for hiding this comment

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

Oh this is def needed piece ! @chibie

Copy link
Contributor

Choose a reason for hiding this comment

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

oh shit! all my polygon backend changes in former models.py (https://github.com/gitcoinco/web/blob/5901de79753445f0c76cd406f49154186e0e80d7/app/grants/models.py) are missing from contribution.py in master!! 😕

Copy link
Author

Choose a reason for hiding this comment

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

@chibie Oh no! I thought I had updated it with all the changes 😞


in_active_clrs = models.ManyToManyField(
GrantCLR,
"GrantCLR",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be in ""

Copy link
Contributor

Choose a reason for hiding this comment

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

yea... i guess it's for lazy loading to prevent circular import

Copy link
Author

Choose a reason for hiding this comment

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

Yep, that's right @chibie


in_active_clrs = models.ManyToManyField(
GrantCLR,
"GrantCLR",
Copy link
Contributor

Choose a reason for hiding this comment

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

yea... i guess it's for lazy loading to prevent circular import

CHECKOUT_TYPES = [
('eth_std', 'eth_std'),
('eth_zksync', 'eth_zksync'),
('eth_polygon', 'eth_polygon'),
Copy link
Contributor

Choose a reason for hiding this comment

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

oh shit! all my polygon backend changes in former models.py (https://github.com/gitcoinco/web/blob/5901de79753445f0c76cd406f49154186e0e80d7/app/grants/models.py) are missing from contribution.py in master!! 😕

@chibie chibie self-requested a review September 29, 2021 11:33
Copy link
Contributor

@chibie chibie left a comment

Choose a reason for hiding this comment

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

let's update this with changes on master after #9539 is merged in

@thelostone-mc thelostone-mc merged commit 281df4b into gitcoinco:master Sep 29, 2021
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.

3 participants