fix tests, add new abstract methods
This commit is contained in:
parent
82907916b7
commit
575917fb5b
|
@ -17,6 +17,10 @@ class AbstractDatabaseRepository(ABC):
|
|||
def get_user_by_id(self) -> User:
|
||||
""""""
|
||||
|
||||
@abstractmethod
|
||||
def update_user_by_id(self) -> User:
|
||||
""""""
|
||||
|
||||
@abstractmethod
|
||||
def delete_user(self) -> None:
|
||||
""""""
|
||||
|
@ -29,6 +33,10 @@ class AbstractDatabaseRepository(ABC):
|
|||
def get_matrix_room(self) -> MatrixRoom:
|
||||
""""""
|
||||
|
||||
@abstractmethod
|
||||
def update_matrix_room(self) -> MatrixRoom:
|
||||
""""""
|
||||
|
||||
@abstractmethod
|
||||
def delete_matrix_room(self) -> None:
|
||||
""""""
|
||||
|
|
|
@ -13,16 +13,11 @@ def create_repository_object():
|
|||
|
||||
|
||||
def test_create_tables():
|
||||
os.system("rm -rf " + PATH)
|
||||
os.system("rm -f " + PATH)
|
||||
repo = create_repository_object()
|
||||
assert repo.create_tables() is None
|
||||
|
||||
|
||||
def test_get_user_by_id():
|
||||
repo = create_repository_object()
|
||||
assert repo.get_user_by_id(user_id="123") is None
|
||||
|
||||
|
||||
def test_create_user():
|
||||
repo = create_repository_object()
|
||||
assert (
|
||||
|
@ -37,3 +32,8 @@ def test_create_user():
|
|||
)
|
||||
is None
|
||||
)
|
||||
|
||||
|
||||
def test_get_user_by_id():
|
||||
repo = create_repository_object()
|
||||
assert repo.get_user_by_id(user_id="123") is None
|
||||
|
|
Reference in a new issue