delete_users fails for in-band registration
When there few users with same username in config file, escalus_users:delete_users() tries to login for second user with same username to unregister and fails.
Temporary workaround could be to pass second argument {by_name, List} with list of users omitting duplicates.
Possible fix would be filtering list of users in delete_users/2.
Please let me know if you like me to prepare a PR for that.
Like you can see in current test.config in ejabberd_tests, we avoid this problem with different usernames for every configuration. Can you describe your case, that requires the same username for various configs? Anyway, nice pull requests are always welcome. :)
I was looking into config file from updated-interaction branch: https://github.com/esl/ejabberd_tests/blob/updated-interaction/test.config which takes seems to take into account changes from this PR https://github.com/esl/escalus/tree/external-auth-automatic-sm-pull-request