It seems the IP address '' resolves to something on some hosts, breaking the tests:
1) factor_email\tests\factor_test::test_generate_email_ip_address_location with data set "empty ip" ('', true)
Failed asserting that '<h2>Your confirmation code</h2>\n
<p>You are trying to log in to Moodle. Your confirmation code is ''.\n
Alternatively you can click <a href="https://www.example.com/moodle/admin/tool/mfa/factor/email/email.php?instance=567000&pass=1&secret">this link</a> from the same device to authorise this session.</p>\n
<h3>IP Information</h3>\n
<p>This login request was made from ''</p>\n
<p>This request appears to have originated from approximately Sydney, Australia.</p>\n
<h3>Browser identity for this request:</h3>\n
<p>username1@example.com</p>\n
<p>If this wasn't you, follow <a href="https://www.example.com/moodle/admin/tool/mfa/factor/email/email.php?instance=567000">this link</a> to stop this login attempt.</p>' contains "The location of the request could not be determined.".
It seems the IP address '' resolves to something on some hosts, breaking the tests: