Fix unit tests when encrypting passwords in datastore.