def test_get_emp() -> None:
    e1 = Employee(1, "Boss", "CEO", 50000, 50)
    assert e1.get_employee(0) is None
    e2 = Employee(2, "Sue", "Manager", 20000, 50)
    e2.become_subordinate(e1)
    assert e1.get_employee(2).name == "Sue"
    e3 = Employee(3, "Emma", "Worker", 10000, 50)
    e3.become_subordinate(e2)
    assert e1.get_employee(3).name == "Emma"
Esempio n. 2
0
def test_get_employee() -> None:
    e1 = Employee(1, "Emma Ployee", "Worker", 10000, 50)
    e2 = Employee(2, "Sue Perior", "Manager", 20000, 30)
    e3 = Leader(3, "Bigg Boss", "CEO", 50000, 60, "Some Corp.")
    e1.become_subordinate(e2)
    e2.become_subordinate(e3)
    assert e3.get_employee(1) is e1
    assert e1.get_employee(1) is e1
    assert e2.get_employee(3) is None