94 |
94 |
'name': 'eighth visualization (duration)',
|
95 |
95 |
'slug': 'eighth',
|
96 |
96 |
},
|
|
97 |
{
|
|
98 |
'data-url': 'https://bijoe.example.com/visualization/9/json/',
|
|
99 |
'path': 'https://bijoe.example.com/visualization/9/iframe/?signature=123',
|
|
100 |
'name': 'nineth visualization (loop over varying dimensions)',
|
|
101 |
'slug': 'nineth',
|
|
102 |
},
|
97 |
103 |
]
|
98 |
104 |
|
99 |
105 |
|
... | ... | |
190 |
196 |
'unit': 'seconds',
|
191 |
197 |
}
|
192 |
198 |
return {'content': json.dumps(response), 'request': request, 'status_code': 200}
|
|
199 |
if url.path == '/visualization/9/json/':
|
|
200 |
response = {
|
|
201 |
'format': '1',
|
|
202 |
'data': [
|
|
203 |
[1, 1, 1, 1],
|
|
204 |
[1],
|
|
205 |
[1, 1],
|
|
206 |
],
|
|
207 |
'axis': {
|
|
208 |
'y_labels': ['web', 'mail', 'email'],
|
|
209 |
'loop': ['a', 'b', 'c', 'd'],
|
|
210 |
}
|
|
211 |
}
|
|
212 |
return {'content': json.dumps(response), 'request': request, 'status_code': 200}
|
193 |
213 |
|
194 |
214 |
|
195 |
215 |
def test_chartng_cell(app):
|
... | ... | |
293 |
313 |
cell.save()
|
294 |
314 |
chart = cell.get_chart()
|
295 |
315 |
|
|
316 |
# loop/X/Y
|
|
317 |
cell.data_reference = 'plop:nineth'
|
|
318 |
cell.save()
|
|
319 |
with pytest.raises(UnsupportedDataSet):
|
|
320 |
chart = cell.get_chart()
|
|
321 |
|
296 |
322 |
|
297 |
323 |
def test_chartng_cell_view(app, normal_user):
|
298 |
324 |
page = Page(title='One', slug='index')
|
... | ... | |
390 |
416 |
(u'plop:example', True, u'example visualization (X)'),
|
391 |
417 |
(u'plop:fifth', False, u'fifth visualization (loop/X)'),
|
392 |
418 |
(u'plop:fourth', False, u'fourth visualization (no axis)'),
|
|
419 |
(u'plop:nineth', False, u'nineth visualization (loop over varying dimensions)'),
|
393 |
420 |
(u'plop:second', False, u'second visualization (Y)'),
|
394 |
421 |
(u'plop:seventh', False, u'seventh visualization (loop/X/Y)'),
|
395 |
422 |
(u'plop:sixth', False, u'sixth visualization (loop/Y)'),
|
396 |
|
-
|