def test_group_renders_gw_ip_if_included(self): assert self.netbox is not None group = Group(self.netbox) group.gw_ip = '192.168.42.254' json = group.to_json() self.assertTrue('gw_ip' in json) self.assertEquals('192.168.42.254', json['gw_ip'])
def test_group_renders_gw_ip_if_included(self): assert self.netbox is not None group = Group(self.netbox) group.gw_ip = '192.168.42.254' json = group.to_json() self.assertTrue('gw_ip' in json) self.assertEqual('192.168.42.254', json['gw_ip'])
def test_group_does_not_raise_exception_when_interface_is_none(self): foo = Group(Mock(name='netbox', spec=Netbox), None)
def test_group_renders_virtual_if_included_and_value_is_false(self): group = Group(self.netbox) group.virtual = False json = group.to_json() self.assertTrue('virtual' in json) self.assertEquals(False, json['virtual'])
def test_group_renders_virtual_if_included_and_value_is_false(self): group = Group(self.netbox) group.virtual = False json = group.to_json() self.assertTrue('virtual' in json) self.assertEqual(False, json['virtual'])
def test_allow_group_interface_to_be_none(self): json = Group(self.netbox).to_json() self.assertFalse('interface' in json['netbox'])