serialized tags working

This commit is contained in:
Sam
2021-01-26 12:00:44 +00:00
parent 4437037710
commit 2a05beec07
5 changed files with 33 additions and 13 deletions

View File

@@ -16,7 +16,6 @@ class ProductFactory(DjangoModelFactory):
sku = FuzzyText(prefix='SKU_', length=10)
name = FuzzyText(prefix='NAME_', length=10)
description = FuzzyText(prefix='DECRIPTION', length=100)
image = None
url = FuzzyText(prefix='http://WEB-LINK-', suffix='.test', length=10)
price = FuzzyDecimal(low=1.00)
shipping_cost = FuzzyDecimal(low=1.00)
@@ -26,9 +25,9 @@ class ProductFactory(DjangoModelFactory):
update_date = FuzzyDateTime(start_dt=timezone.now())
discount = FuzzyDecimal(low=0.00, high=100.00)
stock = FuzzyInteger(low=0)
# tags = models.ManyToMany(Tag, null=True, blank=True )
# category = models.ForeignKey(Tag, null=true) # main tag category
# attributes = models.ManyToMany(Tag, null=True, blank=True )
tags = ['test-tag']
category = 'top-category' # main tag category
attributes = ['programming/python', 'testing']
identifiers = FuzzyText(prefix='IDENTIFIERS_', length=100)
class Meta: