예제 #1
0
 def test__update_readme_Should_CallExpected_When_Match(
         self, open_patch, *patches):
     open_patch.side_effect = [
         mock_open(read_data='line1\nline2\nline3').return_value
     ]
     logger_mock = Mock()
     update_readme('line2', logger_mock)
예제 #2
0
 def test__update_readme_Should_CallExpected_When_NotAccessible(
         self, *patches):
     logger_mock = Mock()
     update_readme('--line-to-add--', logger_mock)
     logger_mock.warn.assert_called()