cloudstack/systemvm/test/python/TestCsAddress.py
Ian Southam bdda01d269 Countless bug fixes, mostly do do with VR redundancy
Also added some new unit tests and adjusted the code to make them work
2015-03-16 11:38:18 +01:00

26 lines
673 B
Python

import unittest
from cs.CsAddress import CsAddress
import merge
class TestCsAddress(unittest.TestCase):
def setUp(self):
merge.DataBag.DPATH = "."
self.csaddress = CsAddress("ips", {})
def test_needs_vrrp(self):
self.assertTrue(self.csaddress.needs_vrrp({"nw_type": "guest"}))
def test_get_guest_if(self):
self.assertTrue(self.csaddress.get_guest_if() is None)
def test_get_guest_ip(self):
self.assertTrue(self.csaddress.get_guest_ip() is None)
def test_get_guest_netmask(self):
self.assertTrue(self.csaddress.get_guest_netmask() == "255.255.255.0")
if __name__ == '__main__':
unittest.main()