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

Testing workshop #9668

Merged
merged 10 commits into from
Nov 23, 2021
Merged

Testing workshop #9668

merged 10 commits into from
Nov 23, 2021

Conversation

ksolo
Copy link
Contributor

@ksolo ksolo commented Nov 8, 2021

Prior to workshop:

  • updated existing factories to leverage the lazy function or lazy attribute for seed data
  • moved factories in grants up to tests/factories instead of tests/models/factories to make them easier to find
  • added test file for bounty fulfillment

Workshop - added bountry fulfillment test.

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.

lgtm! just the comment below

.gitignore Outdated Show resolved Hide resolved
@ksolo ksolo force-pushed the testing-workshop/dashboard-models branch from a07c73b to ab1c515 Compare November 18, 2021 16:01
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.

Nice work @ksolo 🚀 - just a couple of minor comments/questions

.gitignore Outdated Show resolved Hide resolved
from grants.models.cart_activity import CartActivity

from .grant_factory import GrantFactory


@pytest.mark.django_db
class CartActivityFactory(factory.django.DjangoModelFactory):
"""Create mock CartActivity for testing."""
Copy link
Contributor

Choose a reason for hiding this comment

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

How come were removing all of these descriptions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed them because they were technically not correct, these are factories not mocks. I also didn't think they added context. I am happy to put them back in though with the correction that they are factories that return instances of the Django Model.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thats cool with me, I think they're well enough named that we don't need the descriptions!

Co-authored-by: Graham Dixon <[email protected]>
@gdixon gdixon merged commit 8f54d46 into master Nov 23, 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