distinct tools tests by classes

This commit is contained in:
2025-08-25 16:17:47 +02:00
parent 20b72f7288
commit 4511cb312b
3 changed files with 47 additions and 6 deletions

View File

View File

@@ -1,6 +0,0 @@
from venv import create
from sqlalchemy import delete
class TestCustomerTools:
pass

47
tests/tools/test_tools.py Normal file
View File

@@ -0,0 +1,47 @@
import pytest
from sqlalchemy.util import monkeypatch_proxied_specials
from models import Customer
from tools import CustomerTools, CollaboratorTools
class TestCustomerTools:
def test_db_should_be_populated(self, seed, session):
test = session.query(Customer).all()
# print(test)
def test_list_should_return_all_customers(self, seed, session):
tools = CustomerTools(session)
users = tools.list()
assert len(users) == 2
def test_should_create_customer(self, seed, session, monkeypatch):
CustomerTools(session).create(1)
monkeypatch.setattr()
def test_delete_user_should_remove_from_db(self, seed, session):
pass
class TestCollaboratorTools:
def test_should_reply_id_by_name(self, seed, session):
tool = CollaboratorTools(session)
reply = tool.get_id_by_name("Col1")
def test_should_reply_id_by_team_id(self, seed, session):
pass
class TestPasswordTools:
def test_should_retrieve_hashed_password_by_username(self, seed, session):
pass
def test_right_user_could_connect(self, seed, session):
pass
def test_wrong_password_should_fail(self, seed, session):
pass
def test_unknown_user_should_fail(self, seed, session):
pass