How to use the testfixtures.shop_article.create_article function in testfixtures

To help you get started, we’ve selected a few testfixtures examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github byceps / byceps / tests / services / shop / base.py View on Github external
def create_article(self, shop_id, **kwargs):
        article = create_article(shop_id, **kwargs)

        self.db.session.add(article)
        self.db.session.commit()

        return article
github byceps / byceps / tests / unit / services / shop / article / test_article_availability.py View on Github external
def create_article(available_from, available_until):
    return _create_article(
        'shop-123',
        available_from=available_from,
        available_until=available_until,
    )
github byceps / byceps / tests / unit / services / shop / cart / test_cart_emptiness.py View on Github external
def add_item(cart, quantity):
    article = create_article('shop-123')
    cart.add_item(article, quantity)
github byceps / byceps / tests / unit / services / shop / cart / test_cart_item_creation.py View on Github external
def create_item(quantity):
    article = create_article('shop-123')
    return CartItem(article, quantity)
github byceps / byceps / tests / integration / services / shop / helpers.py View on Github external
def create_article(shop_id, **kwargs):
    article = _create_article(shop_id, **kwargs)

    return article_service.create_article(
        shop_id,
        article.item_number,
        article.description,
        article.price,
        article.tax_rate,
        article.quantity,
    )