more collab tests

This commit is contained in:
2025-08-27 10:15:30 +02:00
parent f492b12479
commit a0c0bf7931
3 changed files with 8 additions and 5 deletions

View File

@@ -1,9 +1,11 @@
class TestPasswordTool: class TestPasswordTool:
def test_check(self): def test_check_wrong_user(self):
pass
def test_check_wrong_pwd(self):
pass pass
def get_by_name(self): def get_by_name(self):
pass pass

View File

@@ -10,7 +10,7 @@ engine = create_engine(DB_URL, echo=False)
SessionLocal = sessionmaker(bind=engine) SessionLocal = sessionmaker(bind=engine)
cust1 = ("Cust1", "aa", 11, "Cust1CO") cust1 = ("Cust1", "aa", 11, "Cust1CO")
cust2 = cust2 = ("Cust2", "bb", 22, "Cust2CO")
@pytest.fixture @pytest.fixture
def session(): def session():
@@ -31,7 +31,7 @@ def session():
def seed(session): def seed(session):
session.add_all( session.add_all(
[ [
Customer(cust1), Customer(name="Cust1", email="aa", phone=11, company="Cust1CO"),
Customer(name="Cust2", email="bb", phone=22, company="Cust2CO"), Customer(name="Cust2", email="bb", phone=22, company="Cust2CO"),
] ]
) )

View File

@@ -17,7 +17,7 @@ class TestCustomerTools:
def test_should_create_customer(self, seed, session, monkeypatch): def test_should_create_customer(self, seed, session, monkeypatch):
CustomerTools(session).create(1) CustomerTools(session).create(1)
monkeypatch.setattr() pass
def test_delete_user_should_remove_from_db(self, seed, session): def test_delete_user_should_remove_from_db(self, seed, session):
pass pass
@@ -28,6 +28,7 @@ class TestCollaboratorTools:
def test_should_reply_id_by_name(self, seed, session): def test_should_reply_id_by_name(self, seed, session):
tool = CollaboratorTools(session) tool = CollaboratorTools(session)
reply = tool.get_id_by_name("Col1") reply = tool.get_id_by_name("Col1")
assert reply == 1
def test_should_reply_id_by_team_id(self, seed, session): def test_should_reply_id_by_team_id(self, seed, session):
pass pass