def test__validate_tags(self, mock_logger, mock_get):
        """Ensures that only one of `nofailover`/`nosync' or `failover_priority`/`sync_priority` can be provided"""
        tag_setup = (('nofailover', 'failover_priority'),
                     ('nosync', 'sync_priority',))

        for tag, priority_tag in tag_setup:
            # Providing one tag is fine
            for single_param in ({tag: True}, {priority_tag: 1}, {priority_tag: 0}):
                mock_get.side_effect = [single_param] * 2
                self.assertIsNone(self.config._validate_contradictory_tags())
                mock_logger.warning.assert_not_called()

            # Providing both tags is fine if consistent
            for consistent_state in (
                {tag: False, priority_tag: 1},
                {tag: True, priority_tag: 0},
                {tag: "False", priority_tag: 0}
            ):
                mock_get.side_effect = [consistent_state] * 2
                self.assertIsNone(self.config._validate_contradictory_tags())
                mock_logger.warning.assert_not_called()

            # Providing both inconsistently should log a warning
            for inconsistent_state in (
                {tag: False, priority_tag: 0},
                {tag: True, priority_tag: 1},
                {tag: "False", priority_tag: 1},
                {tag: "", priority_tag: 0}
            ):
                mock_get.side_effect = [inconsistent_state] * 2
                self.assertIsNone(self.config._validate_contradictory_tags())
                mock_logger.warning.assert_called_once_with(
                    'Conflicting configuration between %s: %s and %s: %s.'
                    + ' Defaulting to %s: %s',
                    tag,
                    inconsistent_state[tag],
                    priority_tag,
                    inconsistent_state[priority_tag],
                    tag,
                    inconsistent_state[tag])
                mock_logger.warning.reset_mock()
Ensures that only one of `nofailover`/`nosync' or `failover_priority`/`sync_priority` can be provided
tests/test_config.py