Added Database tests
This commit is contained in:
@ -6,8 +6,8 @@ class Admin(User):
|
||||
|
||||
No additional properties are assigned to the admin
|
||||
'''
|
||||
def __init__(self, id: int, username: str, password: str, firstname: str,
|
||||
lastname: str, email: str, phone: str, role: str):
|
||||
def __init__(self, username: str, password: str, firstname: str,
|
||||
lastname: str, email: str, phone: str):
|
||||
super().__init__(
|
||||
id, username, password, firstname, lastname, email, phone, role
|
||||
username, password, firstname, lastname, email, phone, "Admin"
|
||||
)
|
||||
|
@ -6,9 +6,9 @@ class Customer(User):
|
||||
|
||||
No additional properties are assigned to the customer
|
||||
'''
|
||||
def __init__(self, id: int, username: str, password: str, firstname: str,
|
||||
lastname: str, email: str, phone: str, role: str):
|
||||
def __init__(self, username: str, password: str, firstname: str,
|
||||
lastname: str, email: str, phone: str):
|
||||
super().__init__(
|
||||
id, username, password, firstname, lastname, email, phone, role
|
||||
username, password, firstname, lastname, email, phone, "Customer"
|
||||
)
|
||||
|
||||
|
@ -6,9 +6,9 @@ class Seller(User):
|
||||
|
||||
No additional properties are assigned to the customer
|
||||
'''
|
||||
def __init__(self, id: int, username: str, password: str, firstname: str,
|
||||
lastname: str, email: str, phone: str, role: str):
|
||||
def __init__(self, username: str, password: str, firstname: str,
|
||||
lastname: str, email: str, phone: str):
|
||||
super().__init__(
|
||||
id, username, password, firstname, lastname, email, phone, role
|
||||
id, username, password, firstname, lastname, email, phone, "Seller"
|
||||
)
|
||||
self.store = ""
|
||||
|
@ -3,9 +3,9 @@ from abc import ABC
|
||||
class User(ABC):
|
||||
""" Functional Class constructor to initialise all properties in the base object
|
||||
with a value """
|
||||
def __init__(self, id: int, username: str, password: str, firstname: str,
|
||||
def __init__(self, username: str, password: str, firstname: str,
|
||||
lastname: str, email: str, phone: str, role: str):
|
||||
self.id = id
|
||||
self.id = 0
|
||||
self.username = username
|
||||
self.password = password
|
||||
self.firstName = firstname
|
||||
|
Reference in New Issue
Block a user