def test_add_to_ring(self, mock_get_manager): ring = 'account' node = { 'ip': '172.16.0.2', 'region': 1, 'account_port': 6000, 'zone': 1, 'device': '/dev/sdb', } swift_utils.add_to_ring(ring, node) mock_get_manager().add_dev.assert_called_once_with('account', { 'meta': '', 'zone': 1, 'ip': '172.16.0.2', 'device': '/dev/sdb', 'port': 6000, 'weight': 100 })