MCPcopy Create free account
hub / github.com/apache/cloudstack / test_get_dns

Method test_get_dns

systemvm/test/TestCsGuestNetwork.py:33–42  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

31 self.assertTrue(csguestnetwork is not None)
32
33 def test_get_dns(self):
34 csguestnetwork = CsGuestNetwork({}, CsConfig())
35 csguestnetwork.guest = True
36 csguestnetwork.set_dns("1.1.1.1,2.2.2.2")
37 csguestnetwork.set_router("3.3.3.3")
38 dns = csguestnetwork.get_dns()
39 self.assertTrue(len(dns) == 3)
40 csguestnetwork.set_dns("1.1.1.1")
41 dns = csguestnetwork.get_dns()
42 self.assertTrue(len(dns) == 2)
43
44
45if __name__ == '__main__':

Callers

nothing calls this directly

Calls 6

set_dnsMethod · 0.95
set_routerMethod · 0.95
get_dnsMethod · 0.95
CsGuestNetworkClass · 0.90
CsConfigClass · 0.90
assertTrueMethod · 0.80

Tested by

no test coverage detected