multiple levels of inheritance with different 'on' clauses

Please help to solve a problem:

2 levels of same-table inheritance, but with 2 'on' fields, not a single
the failing test
assert [e.type for e in session.query(Employee).all()] == ['manager', 'engineer', 'engineer', 'engineer']
assert [e.level for e in session.query(Employee).all()] == [None, None, 'junior', 'senior']