We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe8a842 commit 40e7e63Copy full SHA for 40e7e63
1 file changed
tests/unit/test_metadata.py
@@ -480,13 +480,16 @@ def test_user_type(self):
480
481
class HostsTests(unittest.TestCase):
482
def test_iterate_all_hosts_and_modify(self):
483
+ """
484
+ PYTHON-572
485
486
metadata = Metadata()
487
metadata.add_or_return_host(Host('dc1.1', SimpleConvictionPolicy))
488
metadata.add_or_return_host(Host('dc1.2', SimpleConvictionPolicy))
489
- assert len(metadata.all_hosts()) == 2
490
+ self.assertEqual(len(metadata.all_hosts()), 2)
491
- for host in metadata.all_hosts():
492
+ for host in metadata.all_hosts(): # this would previously raise in Py3
493
metadata.remove_host(host)
494
- assert len(metadata.all_hosts()) == 0
495
+ self.assertEqual(len(metadata.all_hosts()), 0)
0 commit comments