package Ġformula ide . client Ċ Ċ import Ġformula ide . api . users . Password Login Ċ import Ġformula ide . client . routes . login Ċ Ċ fun Ġtest Client () Ġ= ĠClient . Anonymous . connect (" http :// localhost : 8 0 0 0 ") Ċ Ċ suspend Ġfun Ġtest Employee (): ĠClient . Authenticated Ġ{ Ċ ĉ val Ġanonymous Ġ= Ġtest Client () Ċ ĉ val Ġtoken Ġ= Ġanonymous . login ( Ċĉ ĉ Password Login (" employee - development - password ", Ġ" employee @ formula ide ") Ċ ĉ ) Ċ ĉ return Ġanonymous . authenticate ( token . token ) Ċ } Ċ Ċ suspend Ġfun Ġtest Administrator (): ĠClient . Authenticated Ġ{ Ċ ĉ val Ġanonymous Ġ= Ġtest Client () Ċ ĉ val Ġtoken Ġ= Ġanonymous . login ( Ċĉ ĉ Password Login (" admin - development - password ", Ġ" admin @ formula ide ") Ċ ĉ ) Ċ ĉ return Ġanonymous . authenticate ( token . token ) Ċ } Ċ