fix tests, add new abstract methods

This commit is contained in:
def 2023-01-15 03:01:04 +04:00
parent 82907916b7
commit 575917fb5b
2 changed files with 14 additions and 6 deletions

View file

@ -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:
""""""

View file

@ -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