Tests

shopkit.core.tests

class shopkit.core.tests.CoreTestMixin

Bases: object

Base class for testing core webshop functionality. This class should not directly be used, rather it should be subclassed similar to the way that included model base classes should be subclassed.

make_product()

Abstract function for creating a test product. As the actual properties of Products depend on the classes actually implementing it, this function must be overridden in subclasses.

setUp()

This function gets the model classes from settings.py and makes them available as self.cusomter_class, self.product_class etcetera.

test_basic_product()

Test if we can create and save a simple product.

test_cart()

Create a shopping cart with several products, quantities and prices.

test_cartitem_from_product()

Create a CartItem from a Product.

test_create_usercustomer()

Create a UserCustomer.

test_order()

Create an order on the basis of a shopping cart and a customer object.

test_orderitem_from_cartitem()

Create an OrderItem from a CartItem.

test_orderstate_change_tracking()

Change the state of an order, see if the state change gets logged.