Exemplo n.º 1
0
 def test_create_link_EEXIST(self):
     with mock.patch.object(os, "symlink") as symlink_mock:
         symlink_mock.side_effect = OSError(errno.EEXIST)
         utils.create_link_without_raise("/fake/source", "/fake/link")
         symlink_mock.assert_called_once_with("/fake/source", "/fake/link")
Exemplo n.º 2
0
 def test_create_link_EEXIST(self):
     with mock.patch.object(os, "symlink") as symlink_mock:
         symlink_mock.side_effect = OSError(errno.EEXIST)
         utils.create_link_without_raise("/fake/source", "/fake/link")
         symlink_mock.assert_called_once_with("/fake/source", "/fake/link")
Exemplo n.º 3
0
 def test_create_link(self):
     with mock.patch.object(os, "symlink") as symlink_mock:
         symlink_mock.return_value = None
         utils.create_link_without_raise("/fake/source", "/fake/link")
         symlink_mock.assert_called_once_with("/fake/source", "/fake/link")
Exemplo n.º 4
0
 def test_create_link(self):
     with mock.patch.object(os, "symlink") as symlink_mock:
         symlink_mock.return_value = None
         utils.create_link_without_raise("/fake/source", "/fake/link")
         symlink_mock.assert_called_once_with("/fake/source", "/fake/link")