Created
October 17, 2022 15:13
-
-
Save mihalt/c45aca5b694e021f97387849373fa626 to your computer and use it in GitHub Desktop.
not_seen_currency_obj_by_django_fixtures
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pytest.fixture | |
def generate_keys(self, key_factory): | |
product_obj = Product.objects.get(pk=self.product_in_order_pk) | |
return lambda **kwargs: key_factory.create_batch(self.product_in_order_quantity, product=product_obj, **kwargs) | |
@pytest.fixture | |
def created_default_keys(self, generate_keys, internal_order): | |
return generate_keys(from_product_in_order__internal_order=internal_order, | |
from_product_in_order__internal_order__currency=Currency.objects.get(name="USD")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment