def test_exists(): """ Test to check if the directory is configured """ mock = MagicMock(return_value=["C:\\Foo", "C:\\Bar"]) with patch.object(win_path, "get_path", mock): # Ensure case insensitivity respected assert (win_path.exists("C:\\FOO")) is True assert (win_path.exists("c:\\foo")) is True assert (win_path.exists("c:\\mystuff")) is False
def test_exists(self): ''' Test to check if the directory is configured ''' get_mock = MagicMock(return_value=['C:\\Foo', 'C:\\Bar']) with patch.object(win_path, 'get_path', get_mock): # Ensure case insensitivity respected self.assertTrue(win_path.exists('C:\\FOO')) self.assertTrue(win_path.exists('c:\\foo')) self.assertFalse(win_path.exists('c:\\mystuff'))
def test_exists(self): ''' Test to check if the directory is configured ''' mock = MagicMock(return_value='c:\\salt') with patch.object(win_path, 'get_path', mock): self.assertTrue(win_path.exists("c:\\salt"))
def test_exists(self): """ Test to check if the directory is configured """ mock = MagicMock(return_value="c:\\salt") with patch.object(win_path, "get_path", mock): self.assertTrue(win_path.exists("c:\\salt"))