##// END OF EJS Templates
Added a test to make sure full state was not getting sent.
Jonathan Frederic -
Show More
@@ -111,6 +111,10 b' casper.notebook_test(function () {'
111 ' a = CInt(0, sync=True)\n' +
111 ' a = CInt(0, sync=True)\n' +
112 ' b = CInt(0, sync=True)\n' +
112 ' b = CInt(0, sync=True)\n' +
113 ' c = CInt(0, sync=True)\n' +
113 ' c = CInt(0, sync=True)\n' +
114 ' d = CInt(-1, sync=True)\n' + // See if it sends a full state.
115 ' def _handle_receive_state(self, sync_data):\n' +
116 ' widgets.Widget._handle_receive_state(self, sync_data)\n'+
117 ' self.d = len(sync_data)\n' +
114 'multiset = MultiSetWidget()\n' +
118 'multiset = MultiSetWidget()\n' +
115 'display(multiset)\n' +
119 'display(multiset)\n' +
116 'print(multiset.model_id)');
120 'print(multiset.model_id)');
@@ -127,6 +131,13 b' casper.notebook_test(function () {'
127 'Multiple model.set calls and one view.touch update state in back-end.');
131 'Multiple model.set calls and one view.touch update state in back-end.');
128 });
132 });
129
133
134 index = this.append_cell(
135 'print("%d" % (multiset.d))');
136 this.execute_cell_then(index, function(index) {
137 this.test.assertEquals(this.get_output_cell(index).text.trim(), '3',
138 'Multiple model.set calls sent a partial state.');
139 });
140
130 var textbox = {};
141 var textbox = {};
131 throttle_index = this.append_cell(
142 throttle_index = this.append_cell(
132 'import time\n' +
143 'import time\n' +
General Comments 0
You need to be logged in to leave comments. Login now