Пример #1
0
 def test_replace_writes_expected_content(self, mock_open):
     store = AlertCursorStore(PROFILE_NAME)
     store.replace("checkpointname", 123)
     user_path = path.join(path.expanduser("~"), ".code42cli")
     path.join(user_path, ALERT_CHECKPOINT_FOLDER_NAME, PROFILE_NAME,
               "checkpointname")
     mock_open.return_value.write.assert_called_once_with("123")
Пример #2
0
 def test_replace_writes_to_expected_file(self, mock_open):
     store = AlertCursorStore(PROFILE_NAME)
     store.replace("checkpointname", 123)
     user_path = path.join(path.expanduser("~"), ".code42cli")
     expected_path = path.join(user_path, ALERT_CHECKPOINT_FOLDER_NAME,
                               PROFILE_NAME, "checkpointname")
     mock_open.assert_called_once_with(expected_path, "w")