コード例 #1
0
ファイル: test_utils.py プロジェクト: drzaeus77/magnum
 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")
コード例 #2
0
ファイル: test_utils.py プロジェクト: yamt/magnum
 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")
コード例 #3
0
ファイル: test_utils.py プロジェクト: drzaeus77/magnum
 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")
コード例 #4
0
ファイル: test_utils.py プロジェクト: yamt/magnum
 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")