def test_hosts_got_sorted(self):
        collection = HostsCollection([Host('a', 10), Host('b', 20), Host('c')])

        hosts = collection.read()

        self.assertEqual(hosts[0].url, 'b')
        self.assertEqual(hosts[1].url, 'a')
        self.assertEqual(hosts[2].url, 'c')
    def test_hosts_got_sorted(self):
        collection = HostsCollection([Host("a", 10), Host("b", 20), Host("c")])

        hosts = collection.read()

        self.assertEqual(hosts[0].url, "b")
        self.assertEqual(hosts[1].url, "a")
        self.assertEqual(hosts[2].url, "c")
    def test_hosts_got_sorted(self):
        collection = HostsCollection([
            Host('a', 10),
            Host('b', 20),
            Host('c')
        ])

        hosts = collection.read()

        self.assertEqual(hosts[0].url, 'b')
        self.assertEqual(hosts[1].url, 'a')
        self.assertEqual(hosts[2].url, 'c')