コード例 #1
0
ファイル: base.py プロジェクト: agripo/website
 def create_category(self, name="Category name"):
     cat = ProductCategory(name=name)
     cat.save()
     return cat
コード例 #2
0
ファイル: test_shop.py プロジェクト: agripo/website
 def test_category_only_needs_a_name(self):
     cat = ProductCategory(name="Cat 1")
     cat.save()  # Should not raise