• Georges Racinet's avatar
    session, User: avoid ambiguity in login flow · c49a65be9f69
    Georges Racinet authored
    The `session` module should be about lower level, not
    object-oriented, primitives that don't care about
    caching of web drivers and generally maintaining state.
    The `login_as_user()` method did not fit there, because
    it called to the Heptapod object, which does exactly that.
    This was an ambiguity, that could easily lead to infinite
    loops when developping new features.
    It is a better fit on the `User` class. Actually the next
    natural move would be to make `webdriver` a property, renaming
    the current attribute to `_webdriver` as already done with
    The only caller, in `test_projects`, is updated by this.
user.py 10.2 KB