Added product tests

This commit is contained in:
2024-01-10 23:44:59 +00:00
parent babc1d6471
commit 75e7ad5994
5 changed files with 67 additions and 6 deletions

View File

@ -10,8 +10,25 @@ class Product:
self.image = "/static/assets/wmgzon.png"
self.description = ""
self.cost = 0.0
self.category = ""
self.category = 0
self.sellerID = 0
self.postedDate = datetime.now()
self.quantityAvailable = 0
'''
Class constructor to instatiate a customer object
No additional properties are assigned to the customer
'''
def __init__(self, name: str, image: str, description: str, cost: float, category: int,
seller_id: int, posted_date: datetime, quantity_available: int):
self.id = 0
self.name = name
self.image = image
self.description = description
self.cost = cost
self.category = category
self.sellerID = seller_id
self.postedDate = posted_date
self.quantityAvailable = quantity_available