def test_get_alias_with_invalid_dev(self, mocked): mocked.side_effect = ValueError result = util.get_alias('eth1:invalid') self.assertEquals(False, result)
def test_get_alias(self, mocked): mocked.return_value = {} result = util.get_alias('eth1:valid') self.assertEquals(True, result)