def test___virtual__non_windows(self, mock):
     mock.return_value = False
     result = win_dns_client.__virtual__()
     expected = (
         False,
         "Module win_dns_client: module only works on Windows systems",
     )
     self.assertEqual(result, expected)
def test___virtual__non_windows():
    mock_false = Mock(return_value=False)
    with patch("salt.utils.platform.is_windows", mock_false):
        result = win_dns_client.__virtual__()
        expected = (
            False,
            "Module win_dns_client: module only works on Windows systems",
        )
        assert result == expected
def test___virtual__():
    result = win_dns_client.__virtual__()
    expected = "win_dns_client"
    assert result == expected
def test___virtual__missing_libs():
    with patch.object(win_dns_client, "HAS_LIBS", False):
        result = win_dns_client.__virtual__()
        expected = (False, "Module win_dns_client: missing required libraries")
        assert result == expected
 def test___virtual__(self):
     result = win_dns_client.__virtual__()
     expected = "win_dns_client"
     self.assertEqual(result, expected)
 def test___virtual__missing_libs(self):
     result = win_dns_client.__virtual__()
     expected = (False, "Module win_dns_client: missing required libraries")
     self.assertEqual(result, expected)