Skip to content

Commit

Permalink
Added stub Product model
Browse files Browse the repository at this point in the history
  • Loading branch information
brosner committed Dec 8, 2015
1 parent 18c5b9c commit 3a1dd2e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
2 changes: 2 additions & 0 deletions pinax/cart/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from .cart import Cart
from .product import Product


__all__ = [
Cart,
Product,
]
4 changes: 3 additions & 1 deletion pinax/cart/models/cart.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from django.conf import settings
from django.db import models


class Cart(models.Model):
pass

owner = models.ForeignKey(settings.AUTH_USER_MODEL)
6 changes: 6 additions & 0 deletions pinax/cart/models/product.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.db import models


class Product(models.Model):

name = models.CharField(max_length=120)
2 changes: 1 addition & 1 deletion pinax/cart/tests/test_cart.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

class CartTestCase(TestCase):

def test_cart(self):
def test_cart_count(self):
self.assertEqual(Cart.objects.count(), 0)
9 changes: 9 additions & 0 deletions pinax/cart/tests/test_product.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from django.test import TestCase

from pinax.cart.models import Product


class ProductTestCase(TestCase):

def test_product_count(self):
self.assertEqual(Product.objects.count(), 0)

0 comments on commit 3a1dd2e

Please sign in to comment.