From 0bef50c8097ab52df424c94176e913dcb1d8f7f5 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Mon, 9 Sep 2024 16:55:09 +0100 Subject: Clean up and sort imports --- pyblackbird_cc/payments/tests/test_models.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'pyblackbird_cc/payments/tests/test_models.py') diff --git a/pyblackbird_cc/payments/tests/test_models.py b/pyblackbird_cc/payments/tests/test_models.py index 342ff14..132d025 100644 --- a/pyblackbird_cc/payments/tests/test_models.py +++ b/pyblackbird_cc/payments/tests/test_models.py @@ -3,16 +3,16 @@ from allauth.account.signals import user_signed_up from django.contrib.auth import get_user_model from django.test import RequestFactory -from pyblackbird_cc.payments.models import SubscriptionPlan, Subscription +from pyblackbird_cc.payments.models import Subscription +from pyblackbird_cc.payments.models import SubscriptionPlan User = get_user_model() + @pytest.fixture def user_data(): - return { - 'email': 'testuser@example.com', - 'password': 'testpassword123' - } + return {"email": "testuser@example.com", "password": "testpassword123"} + @pytest.mark.django_db def test_user_signup_assigns_free_subscription(user_data): @@ -23,11 +23,11 @@ def test_user_signup_assigns_free_subscription(user_data): "price": 0, "description": "Free plan description", "allowed_downloads": 10, - } - ) # Create a new user + }, + ) # Create a new user user = User.objects.create_user(**user_data) # Manually trigger the user_signed_up signal - request = RequestFactory().get('/') + request = RequestFactory().get("/") user_signed_up.send(sender=user.__class__, request=request, user=user) # Check if a SubscriptionPlan was created for the user @@ -38,4 +38,4 @@ def test_user_signup_assigns_free_subscription(user_data): assert subscription.plan == free_plan # Additional assertions can be added here to check other properties - # of the SubscriptionPlan or Subscription as needed \ No newline at end of file + # of the SubscriptionPlan or Subscription as needed -- cgit v1.2.3