def _is_in_last_nexus_cfg(self, words):
        if (self.mock_ncclient.connect.return_value.
            edit_config.call_count == 0):
            return False

        last_cfg = (self.mock_ncclient.connect.return_value.
                    edit_config.mock_calls[-1][2]['config'])
        result = all(word in last_cfg for word in words)

        # If persistent_switch_config, 'copy run start' also sent.
        if result is True and cfg.CONF.ml2_cisco.persistent_switch_config:
            last_cfg = (self.mock_ncclient.connect.return_value.
                        edit_config.mock_calls[-1][2]['config'])
            preserve_words = ['copy', 'running-config', 'startup-config']
            result = all(word in last_cfg for word in preserve_words)
        return result
Confirm last non-preserve config sent to Nexus
dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/tests/unit/ml2/drivers/cisco/nexus/test_cisco_mech.py/CiscoML2MechanismTestCase._is_in_last_nexus_cfg