Testing internal implementation leads to fragile tests that break often for no good reason.
We should try to make very clear in our code what is part of a class's API and what is internal implementation. Internal implementation should be named accordingly (e.g. using a single underscore prefix in Python).
Internal implementation of a class (whether class attribute or method) should not be accessed directly from outside the class. This includes other classes using it but also includes tests. Unit tests should only call the classes public API, as the internal implementation might change without notice and should not break the tests.