mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-07 13:07:22 +08:00
trust is stored in code_cell.metadata
not top-level code_cell
This commit is contained in:
parent
ddd3aa2a5a
commit
4ae05c729c
@ -311,13 +311,13 @@ class TestContentsManager(TestCase):
|
||||
cm.mark_trusted_cells(nb, name, path)
|
||||
for cell in nb.worksheets[0].cells:
|
||||
if cell.cell_type == 'code':
|
||||
assert not cell.trusted
|
||||
assert not cell.metadata.trusted
|
||||
|
||||
cm.trust_notebook(name, path)
|
||||
nb = cm.get_model(name, path)['content']
|
||||
for cell in nb.worksheets[0].cells:
|
||||
if cell.cell_type == 'code':
|
||||
assert cell.trusted
|
||||
assert cell.metadata.trusted
|
||||
|
||||
def test_check_and_sign(self):
|
||||
cm = self.contents_manager
|
||||
|
@ -472,7 +472,7 @@ define([
|
||||
} else {
|
||||
this.set_input_prompt();
|
||||
}
|
||||
this.output_area.trusted = data.trusted || false;
|
||||
this.output_area.trusted = data.metadata.trusted || false;
|
||||
this.output_area.fromJSON(data.outputs);
|
||||
if (data.collapsed !== undefined) {
|
||||
if (data.collapsed) {
|
||||
@ -495,8 +495,8 @@ define([
|
||||
var outputs = this.output_area.toJSON();
|
||||
data.outputs = outputs;
|
||||
data.language = 'python';
|
||||
data.trusted = this.output_area.trusted;
|
||||
data.collapsed = this.collapsed;
|
||||
data.metadata.trusted = this.output_area.trusted;
|
||||
data.collapsed = this.output_area.collapsed;
|
||||
return data;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user